FOSS-Community / LinkLiberate

LinkLiberate : A libre url shortner
https://ll.fosscu.org
MIT License
8 stars 12 forks source link

Add unittest #19

Closed Jonatan-Chaverri closed 9 months ago

Jonatan-Chaverri commented 9 months ago

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

Jonatan-Chaverri commented 9 months ago

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

SAMAD101 commented 9 months ago

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 commented 9 months ago

@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.

SAMAD101 commented 9 months ago

Thank you very much for contributing @Jonatan-Chaverri