def test_get_html_email_options_add_email_branding_from_service(
        sample_service):
    branding = create_email_branding()
    sample_service.email_branding = branding
    email_options = get_html_email_options(sample_service)
    assert email_options is not None
    assert email_options == {
        'govuk_banner':
        branding.brand_type == BRANDING_BOTH,
        'brand_banner':
        branding.brand_type == BRANDING_ORG_BANNER,
        'brand_colour':
        branding.colour,
        'brand_logo':
        get_logo_url(current_app.config['ADMIN_BASE_URL'], branding.logo),
        'brand_text':
        branding.text,
        'brand_name':
        branding.name,
    }
def test_get_logo_url_works_for_different_environments(base_url, expected_url):
    logo_file = 'filename.png'

    logo_url = send_to_providers.get_logo_url(base_url, logo_file)

    assert logo_url == expected_url
Пример #3
0
def test_get_logo_url(base_url, expected_url):
    logo_file = 'f.png'

    logo_url = send_to_providers.get_logo_url(base_url, logo_file)

    assert logo_url == expected_url
def test_get_logo_url_works_for_different_environments(base_url, expected_url):
    logo_file = 'filename.png'

    logo_url = send_to_providers.get_logo_url(base_url, logo_file)
    domain = "dev-notifications-va-gov-assets.s3.amazonaws.com"
    assert logo_url == "https://{}/{}".format(domain, expected_url)
def test_get_logo_url_works_for_different_environments(base_url, expected_url):
    logo_file = 'filename.png'

    logo_url = send_to_providers.get_logo_url(base_url, logo_file)
    domain = "pgn-qc-ca-asset-upload.s3.ca-central-1.amazonaws.com"
    assert logo_url == "https://{}/{}".format(domain, expected_url)