def setup_data_with_enrolled_respondent_user_and_collection_exercise_to_live(context): """ Creates default data, an enrolled Respondent waits until collection exercise state = live """ create_default_data(context) create_enrolled_respondent_for_the_test_survey(context) collection_exercise_controller.wait_for_collection_exercise_state(context.survey_id, context.period, expected_state=COLLECTION_EXERCISE_LIVE) context.add_cleanup(sign_out_internal.try_sign_out)
def setup_data_with_enrolled_respondent_and_additional_iac(context): """ Creates a new enrolled user and generates an additional IAC code """ setup_data_with_internal_user(context) create_enrolled_respondent_for_the_test_survey(context) create_new_iac(context) collection_exercise_controller.wait_for_collection_exercise_state(context.survey_id, context.period, expected_state=COLLECTION_EXERCISE_LIVE) context.add_cleanup(sign_out_internal.try_sign_out) context.second_iac = generate_new_enrolment_code_from_existing_code(context.iac)
def setup_data_with_2_enrolled_respondent_users_and_internal_user(context): """ Creates default survey + 2 enrolled respondents in a collection exercise """ setup_data_with_internal_user(context) create_enrolled_respondent_for_the_test_survey(context) # Create second enrolled respondent new_iac = generate_new_enrolment_code_from_existing_code(context.iac) second_ru_ref = create_ru_reference() context.used_email_address = create_respondent_email_address(second_ru_ref) create_respondent(context.used_email_address, new_iac, context.phone_number) create_respondent_user_login_account(context.used_email_address)
def setup_data_with_enrolled_respondent_user_and_internal_user(context): """ Creates default data + an enrolled Respondent in the default collection exercise """ setup_data_with_internal_user(context) create_enrolled_respondent_for_the_test_survey(context) context.add_cleanup(sign_out_internal.try_sign_out)
def setup_data_with_enrolled_respondent_user(context): create_default_data(context) create_enrolled_respondent_for_the_test_survey(context)
def setup_data_with_enrolled_respondent_user_and_eq_collection_exercise_live(context): create_default_data(context, eq_ci=True) collection_exercise_controller.wait_for_collection_exercise_state(context.survey_id, context.period, expected_state=COLLECTION_EXERCISE_LIVE) create_enrolled_respondent_for_the_test_survey(context)