Open-Assistant
Open-Assistant copied to clipboard
[WIP] Setting up scaffolding for backend tests
Establishes a setup for testing described in #84.
The purpose of this PR is to enable users for writing unit tests for the backend and, probably, discord-bot components of the Open-Assistant repo.
So far, it only has a trivial test that runs against a single API endpoint. (The app is instantiated in debug mode via the .env file.) But I decided to open a draft PR in order to keep the process transparent and communicate to other contributors. Also, to see if I'm on the right track with this issue.
cc @jack-michaud @andreaskoepf
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
:x: pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
I guess it was somehow automatically closed because of rebasing/merging the fork 🤔
I made one more attempt to restructure the dependencies a bit and try injecting them without a single "context" class including all possible repositories at once. Also, I had to move FrontendUserId into a separate file to avoid circular imports. Plus, I deleted one test as I am not sure how to deal with a nested @managed_tx_function.