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

Compare with Current View Page History

« Previous Version 3 Next »

For now, to run this test:
  1. comment out 'application = create_app('DEV')' in app init.py
 2. cd to docker_code and run 'python3 -m unittest data/tests/db_helloworld_test.py'

Test files are located in dev-backend/flask_docker/test

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.

 

samples_test.py

functions

Doc
get_user_auth
helper function to get auth for a mock user
upload_sample_image
helper function to upload a sample image
upload_sample_survey
helper function to upload sample survey (sample data)
get_sample_survey
helper function to get survey data of a sample
test_upload_sample
test if a user can upload a sample
test_get_sample
test if a user can get a specific sample
test_get_sample_count_total
test if a user can get the sample count
test_get_samples
test if a user can get a sample list
  • No labels