Exemplo n.º 1
0
 def get_context_data(self, *args, **kwargs):
     return super().get_context_data(
         verification_missing_url=urls.build_great_url(
             'contact/triage/great-account/verification-missing/'),
         contact_url=urls.build_great_url('contact/domestic/'),
         *args,
         **kwargs)
Exemplo n.º 2
0
def test_confirm_user_resend_verification_context_urls(client):
    url = reverse('resend-verification',
                  kwargs={'step': views.RESEND_VERIFICATION})

    response = client.get(url)

    missing_url = constants_url.build_great_url(
        'contact/triage/great-account/verification-missing/')
    contact_url = constants_url.build_great_url('contact/domestic/')

    assert response.status_code == 200
    assert response.context_data['verification_missing_url'] == missing_url
    assert response.context_data['contact_url'] == contact_url
def footer_contact_us_link(request):
    if settings.FEATURE_FLAGS.get('INTERNATIONAL_CONTACT_LINK_ON'):
        footer_contact_us_link = urls.build_great_url('international/contact/')
    else:
        footer_contact_us_link = urls.CONTACT_US

    return {'footer_contact_us_link': footer_contact_us_link}
Exemplo n.º 4
0
 def get_context_data(self, *args, **kwargs):
     context = super().get_context_data(*args, **kwargs)
     if self.steps.current == COMPANY_SEARCH:
         context['company_not_found_url'] = urls.build_great_url(
             'contact/triage/great-account/company-not-found/'
         )
     return context
Exemplo n.º 5
0
 def get_context_data(self, *args, **kwargs):
     context = super().get_context_data(*args, **kwargs)
     if self.steps.current == PERSONAL_INFO:
         context['company'] = self.get_cleaned_data_for_step(BUSINESS_INFO)
     elif self.steps.current == VERIFICATION:
         context['verification_missing_url'] = urls.build_great_url(
             'contact/triage/great-account/verification-missing/')
     return context
Exemplo n.º 6
0
def test_verification_missing_url(submit_companies_house_step,
                                  mock_session_user, client, steps_data):
    response = submit_companies_house_step(steps_data[views.USER_ACCOUNT])
    response = client.get(response.url)

    verification_missing_url = constants_url.build_great_url(
        'contact/triage/great-account/verification-missing/')

    assert response.context_data[
        'verification_missing_url'] == verification_missing_url
Exemplo n.º 7
0
def test_companies_house_search_has_company_not_found_url(
        submit_companies_house_step, mock_session_user, client, steps_data):
    response = submit_companies_house_step(steps_data[views.USER_ACCOUNT])
    assert response.status_code == 302

    response = submit_companies_house_step(steps_data[views.VERIFICATION])
    assert response.status_code == 302

    mock_session_user.login()
    response = client.get(response.url)

    not_found_url = constants_url.build_great_url(
        'contact/triage/great-account/company-not-found/')

    assert response.context_data['company_not_found_url'] == not_found_url