mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-02 07:00:51 -04:00
fix tests
This commit is contained in:
@@ -18,27 +18,12 @@ def test_renders(client_request, mocker, query_args, result):
|
||||
assert response.get_data(as_text=True) == 'rendered'
|
||||
|
||||
|
||||
def test_displays_govuk_branding_by_default(client_request):
|
||||
|
||||
page = client_request.get('main.email_template', _test_page_title=False)
|
||||
|
||||
assert page.find("a", attrs={"href": "https://www.gov.uk"})
|
||||
|
||||
|
||||
def test_displays_govuk_branding(client_request, mock_get_email_branding_with_govuk_brand_type):
|
||||
|
||||
page = client_request.get('main.email_template', branding_style="1", _test_page_title=False)
|
||||
|
||||
assert page.find("a", attrs={"href": "https://www.gov.uk"})
|
||||
|
||||
|
||||
def test_displays_both_branding(client_request, mock_get_email_branding_with_both_brand_type):
|
||||
|
||||
page = client_request.get('main.email_template', branding_style="1", _test_page_title=False)
|
||||
|
||||
mock_get_email_branding_with_both_brand_type.assert_called_once_with('1')
|
||||
|
||||
assert page.find("a", attrs={"href": "https://www.gov.uk"})
|
||||
assert page.find("img", attrs={"src": re.compile("example.png$")})
|
||||
assert page.select("body > table:nth-of-type(3) table > tr:nth-of-type(1) > td:nth-of-type(2)")[0]\
|
||||
.get_text().strip() == 'Organization text' # brand text is set
|
||||
|
||||
Reference in New Issue
Block a user