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 unittest #19

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Conversation

Jonatan-Chaverri
Copy link

Related to

Related to #8 by @SAMAD101

Description

Add unittest for the main APIs.

Technical details

Adding pytest using FastAPI test client and pytest-mock library.

Tests

You can run the test by running
pytest tests

Screenshots

Screenshot 2024-01-20 at 16 36 38

Checklist

  • [x ] My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • [] My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

@Jonatan-Chaverri
Copy link
Author

I can also create a github workflow in order to check unittest passing before merging PRs. Let me know.

@SAMAD101
Copy link
Member

I can also create a github workflow in order to check unittest passing before merging PRs. Let me know.

LGTM
That would be great if you can do that!

@Jonatan-Chaverri
Copy link
Author

@SAMAD101 I added the workflow, however I think you need to approve it before it can run. You can check the configured actions settings for the repo and enable external contributors to run workflows.

@Jonatan-Chaverri Jonatan-Chaverri force-pushed the add_unittest branch 2 times, most recently from 7a7523f to 546b1b8 Compare January 23, 2024 00:23
Adds unittest for routes GET "/", GET and POST "/liberate" and GET "/valid_uuid.
@SAMAD101
Copy link
Member

Thank you very much for contributing @Jonatan-Chaverri

@SAMAD101 SAMAD101 merged commit eb99d86 into FOSS-Community:main Jan 24, 2024
3 checks passed
@Jonatan-Chaverri Jonatan-Chaverri deleted the add_unittest branch January 24, 2024 21:44
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.

2 participants