Skip to content

added login model test#1

Open
nifedara wants to merge 3 commits intomasterfrom
tests/login-model
Open

added login model test#1
nifedara wants to merge 3 commits intomasterfrom
tests/login-model

Conversation

@nifedara
Copy link
Copy Markdown
Owner

@nifedara nifedara commented Mar 29, 2024

What does this PR do?

Adds backend test case

Consideration?

  • Although some might suggest to not test a model that doesn't have a return statement, I added test for this as it is nice to have
  • I ensured to use Black formatter
  • I used coverage to see test coverage but didn't add that to the requirement file. So to check coverage, you will have to install coverage yourself

How to test?

  • Clone this repo
  • Follow the installation guide
  • run docker exec -it api bash to run the following commands in the container:
    • coverage run --omit='*/usr/*' manage.py test tests.test_login_model
    • or just coverage run manage.py test tests.test_login_model
    • coverage report --omit='*/usr/*' (to see a report of the test coverage)

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.

1 participant