Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal setup for the API tests #697

Merged
merged 8 commits into from
Oct 12, 2023
Merged

Add minimal setup for the API tests #697

merged 8 commits into from
Oct 12, 2023

Conversation

anarute
Copy link
Member

@anarute anarute commented Oct 11, 2023

Initially it only tests the status endpoint, but I'll start creating tests for the existing services and endpoints.

To run the tests locally you can do it through tox: tox -e pytest or running pytest -v directly from the api folder.

Closes #698

@anarute anarute requested a review from dmtrek14 October 11, 2023 15:39
@anarute anarute marked this pull request as draft October 11, 2023 16:02
@anarute anarute force-pushed the add-api-tests branch 2 times, most recently from c00a8ff to d431ad1 Compare October 11, 2023 16:31
@anarute anarute marked this pull request as ready for review October 11, 2023 16:39
This is not needed anymore as we handle the db with alembic
and it was impacting the test setup as it requires a db
connection only by importing the app.
Fix warning: "MovedIn20Warning: The ``as_declarative()`` function is now
available as sqlalchemy.orm.as_declarative() (deprecated since: 2.0)
(Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)"
It was about time we remove this hello world :D
It needs the .env file to get the variables instead of getting
from the environment variables
Copy link
Collaborator

@dmtrek14 dmtrek14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks!

@anarute anarute merged commit e2fd241 into main Oct 12, 2023
1 check passed
@anarute anarute deleted the add-api-tests branch October 12, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up and configure tests for API
2 participants