def test_get_high_schools_hs_id(): logger.info("GET /high_schools{hs_id} - Positive Test") response = get('/high_schools/HS017655') responseTest(response.status, 200) print(response.body)
def test_get_high_schools_searchcriteria(): logger.info("GET /high_schools - Positive Test") response = get('/high_schools?search=a%20%26%20m&limit=100&offset=0') responseTest(response.status, 200) print(response.body)
def test_get_colleges_offset_limit_search(): logger.info("GET /colleges - Positive Test") response = get('/colleges?offset=0&limit=10&search=texas') responseTest(response.status, 200) print(response.body)
def test_get_encourage_user(): logger.info("GET /encourage_users/{entitykey} - Positive Test") response = get('/encourage_users/' + MentorEntityKey) responseTest(response.status, 200) print(response.body)
def test_get_survey_questions(): logger.info( "GET /survey_questions?year=2021&editions=mco,mop - Positive Test") response = get('/survey_questions?year=2021&editions=mco,mop') responseTest(response.status, 200) print(response.body)
def test_get_lead_generation_mcocid(): logger.info("GET /lead_generation/{mcocid} - Positive Test") response = get('/lead_generation/10692') responseTest(response.status, 200) print(response.body)
def test_get_lead_generation_student(): logger.info("GET /lead_generation/student/{authentication_id} - Positive Test") response = get('/lead_generation/student/53276DD6-6865-4CCD-B9BF-7D8E10BDCF92') responseTest(response.status, 200) print(response.body)
def test_get_esurvey(): logger.info("GET /esurvey/in_class_survey/{document_name} - Positive Test") response = get('/esurvey/in_class_survey/ACTFL') responseTest(response.status, 200) print(response.body) responseTest(response.body['document_name'], 'ACTFL')
def test_getstudents(): logger.info("GET /students/{student_key} - Positive Test") response = get('/students/966365098') responseTest(response.status, 200) print (response.body)
def test_getstudents_surveyanswers(): logger.info("GET /students/{student_key}/survey_answers?year=2019&editions=mco,mop - Positive Test") response = get('/students/966365098/survey_answers?year=2019&editions=mco,mop') responseTest(response.status, 200) print (response.body)
def test_get_campaign_validate_student_pin(): logger.info("GET /campaign/student/validate/{pin} - Positive Test") response = get('/campaign/student/validate/R3GF9Q') responseTest(response.status, 200) print(response.body) responseTest(response.body['student_key'], 966365098)
def test_email_settings_authentication_id(): logger.info("GET /email_settings?authentication_id={Authentication_ID} - Positive Test") response = get('/email_settings?authentication_id=' + Authentication_ID) responseTest(response.status, 200) print(response.body)
def test_get_encourage_user_relationship(): logger.info( "GET /encourage_users/{entitykey}/relationships - Positive Test") response = get('/encourage_users/' + MentorEntityKey + '/relationships') responseTest(response.status, 200) print(response.body)
def test_get_colleges_mcocid(): logger.info("GET /colleges - Positive Test") response = get('/colleges/1466') responseTest(response.status, 200) print(response.body) responseTest(response.body['mcocid'], 1466)
def test_email_settings_authentication_id_check1(): logger.info("GET /email_settings?authentication_id={Authentication_ID} - Positive Test") response = get('/email_settings?authentication_id=' + Authentication_ID) responseTest(response.status, 200) responseTest(response.body['StudentCommunications'], False) responseTest(response.body['EmailActive'], True) print(response.body)
def test_email_settings_entitytype(): logger.info("GET /email_settings/options?entity_type_key={entity_type - Positive Test") # EntityType 3 is a High school student response = get('/email_settings/options?entity_type_key=3') responseTest(response.status, 200) print(response.body)
def test_get_campaign_campaignname(): logger.info("GET /campaign/{campaign_name} - Positive Test") response = get('/campaign/Culinary-Institute-of-America') responseTest(response.status, 200) print(response.body) responseTest(response.body['campaign_name'], "Culinary-Institute-of-America")
def test_account_verification_error(): logger.info( "GET /account_verification/?authentication_id={Authentication_ID} - Positive Test" ) response = get('/account_verification/?authentication_id=' + auth_id) responseTest(response.status, 404) responseTest(response.body['error_code'], "ACCOUNT_NOT_FOUND") print(response.body)
def test_account_verification(): logger.info( "GET /account_verification/?authentication_id={Authentication_ID} - Positive Test" ) response = get('/account_verification/?authentication_id=' + auth_id) responseTest(response.status, 200) print(response.body)
def test_getstudents(): logger.info("GET /students/{student_key} - Positive Test") response = get('/students/' + EntityKey) responseTest(response.status, 200) print(response.body) global Authentication_ID Authentication_ID = response.body['authentication_id']
def test_account_verification_is_auto_login(): logger.info( "GET /account_verification/is_auto_login?authentication_id={Authentication_ID} - Positive Test" ) response = get('/account_verification/is_auto_login?authentication_id=' + Authentication_ID) responseTest(response.status, 200) print(response.body) responseTest(response.body['is_auto_login'], True)
def test_get_encourage_user_relationship_student_search(): logger.info( "GET /encourage_users/{entitykey}/student_search - Positive Test") response = get( '/encourage_users/' + MentorEntityKey + '/students_search?relationship_type_keys=8,9&graduation_years=2020,2021,2022&search=a&limit=10&offset=0' ) responseTest(response.status, 200) print(response.body)