def test_segmentation_catalog_is_listed(self, app_config, country, load_test_user): user_data = load_test_user(user_type='bso', country=country) u = User(app_config, data=user_data) cat = SegmentationCatalog(u) r = cat.get_segmentation(segmentation_type_id=1) pretty_print(r.json())
def test_case_request(self, app_config, country, load_test_user, load_document_data): user_data = load_test_user(user_type='ols', country=country) file = load_document_data() u = User(app_config, data=user_data) case_request = CaseRequest(u) r = case_request.post_new_case_request(customer_id=u.get_customer_id()) r = case_request.patch_case_request_description(case_request=r) r = case_request.patch_case_request_title(case_request=r) r = case_request.patch_case_request_type(case_request=r) r = case_request.patch_case_jobsite(case_request=r) r = case_request.put_case_businesslines(case_request=r) r = case_request.put_case_contact(case_request=r) r = case_request.post_case_request_document(case_request=r, file=file) r = case_request.patch_case_to_requested(case_request=r) pretty_print(r.json())
def test_location_request_with_crm_integration(self, app_config, country, load_test_user, load_document_data): user_data = load_test_user(user_type='crm', country=country) u = User(app_config, data=user_data) location_request = JobsiteRequest(u) r = location_request.post_new() r = location_request.patch_opportunity_address(opportunity=r) if country == 'US': r = location_request.patch_taxable_document( opportunity=r, file=load_document_data()) r = location_request.put_opportunity_business_lines( opportunity=r, bl_codes=['RMX', 'CEM', 'AGG']) r = location_request.put_contact_request(opportunity=r) r = location_request.patch_opportunity_status_requested(opportunity=r) pretty_print(r.json())
def test_quote_request_with_crm_integration(self, app_config, country, load_test_user, load_document_data): user_data = load_test_user(user_type='crm', country=country) u = User(app_config, data=user_data) quote_request = QuoteRequest(u) r = quote_request.post_new() r = quote_request.patch_opportunity_address(opportunity=r) if country == 'US': r = quote_request.patch_taxable_document(opportunity=r, file=load_document_data()) r = quote_request.patch_project_document(opportunity=r, file=load_document_data()) r = quote_request.put_opportunity_business_lines(opportunity=r, bl_codes=['RMX']) r = quote_request.put_contact_request(opportunity=r) r = quote_request.patch_opportunity_status_requested(opportunity=r) code = r.json().get('requestCode') print('O Requested code generated: %s' % code)
def test_segmentation_catalog_full_branch_creation(self, app_config, country, load_test_user): user_data = load_test_user(user_type='bso', country=country) u = User(app_config, data=user_data) cat = SegmentationCatalog(u) r = cat.post_segmentation(segmentation_type_code='S')