You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Test files are located in dev-backend/flask_docker/unittests
For now, to run this test:
  1. cd to docker_code and run 'python3 -m unittest unittests/[test_name]'
Note: Please run the unit test in the docker container: under www/var (reference: Dev/Debug in Container)
Otherwise, you will need to install all dependencies in your local env.
 

 

User test functions

Doc
model_test.py/test_user_createtest if a user can be created correctly
model_test.py/create_userhelper function to create a user
model_test.py/test_generate_password_hashtest if a password hash can be generate correctly
model_test.py/test_check_password_hashtest if the password checking working properly
api_test.py/test_app_is_testingtest if the app is running in TEST mode
api_test.py/registerhelper function to register a new user by API
api_test.py/test_registertest if a user can be registered correctly via register API
api_test.py/test_logintest if a user can logged in with credentials via log in API
api_test.py/test_logouttest if a user can logout via log out API
  • No labels