Fix references to email HTML in tests

This commit is contained in:
Tom Byers
2018-10-16 15:08:53 +01:00
parent e9afad80ed
commit f5014e8352

View File

@@ -54,7 +54,7 @@ def test_displays_both_branding(client, mock_get_email_branding_with_both_brand_
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 table > tr:nth-of-type(2) > td:nth-of-type(5)")[0]\
assert page.select("body > table:nth-of-type(3) table > tr:nth-of-type(1) > td:nth-of-type(2)")[0]\
.get_text().strip() == 'Organisation text' # brand text is set
@@ -71,7 +71,7 @@ def test_displays_org_branding(client, mock_get_email_branding):
assert not page.find("a", attrs={"href": "https://www.gov.uk"})
assert page.find("img", attrs={"src": re.compile("example.png")})
assert not page.select("body > table > tr > td[bgcolor='#f00']") # banner colour is not set
assert page.select("body > table table > tr:nth-of-type(2) > td:nth-of-type(5)")[0]\
assert page.select("body > table:nth-of-type(1) > tr:nth-of-type(1) > td:nth-of-type(2)")[0]\
.get_text().strip() == 'Organisation text' # brand text is set