Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

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

 

 

 

 

users_test.py

functions

Doc
test_make_user

test if we can create a user successfully

 

 

 

 

authentication_test.py

functions

Doc
test_authenticate_no_such_usertest authenticating non-existed user
test_authenticate_pwd_is_nonetest authenticating a user who has not set password will send a password set email
test_authenticate_diff_pwdtest authenticating a user with the wrong password
test_authenticatetest authenticating a normal user
test_reset_password_invalid_email_addresstest resetting password given an invalid email address
test_reset_password_update_pwdtest resetting password
test_reset_password_unauthorizedtest resetting password for an unauthorized user
test_request_password_reset_invalid_emailtest requesting password reset with an invalid email address
test_request_password_reset_no_user_datatest requesting password reset with non-existed user
test_request_password_resettest requesting password reset
test_logouttest if a user can log out successfully

 

 

 

 

survey_test.py

functions

Doc
get_user_authhelper function to get auth for a mock user
test_upload_survey

Test to see if a valid survey is able to uploaded and stored in the database with a survey name

test_survey_retrievalTest to see if the survey can be retrieved in the right format in addition to the ability to return responses for the survey