Move email tests to a sub folder and only run in CI when deploying to prod
House keeping
Refactored some import statements in the test files to align with our style guide.
Changed
I moved any tests that involved our mail service being used to /users/project/tests/mail
this way we are not running them everytime we need to test as we are limited to 200 emails/day by the Mail Jet API.
I also changed the CI file so that tests requiring emails are only ran when deploying to prod.
Notes
To add tests that involve emails being sent please add them to /users/project/tests/mail/
When running tests, please use this command now:
$ docker-compose exec users python -m pytest "project/tests" --ignore=project/tests/mail/ -p no:warnings
To run the email tests use this command:
$ docker-compose exec users python -m pytest "project/tests/mail" -p no:warnings