mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 18:25:58 +02:00
updated the tests
This commit is contained in:
parent
37ebe4e59b
commit
eb2a5f6a17
2 changed files with 30719 additions and 2 deletions
30711
src/output.html
Normal file
30711
src/output.html
Normal file
File diff suppressed because one or more lines are too long
|
@ -576,9 +576,15 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
response = self.client.get("/admin/registrar/domainrequest/?generic_org_type__exact=federal")
|
||||
# There are 2 template references to Federal (4) and two in the results data
|
||||
# of the request
|
||||
self.assertContains(response, "Federal", count=52)
|
||||
html_content = response.content.decode('utf-8')
|
||||
|
||||
# Write the HTML content to a file
|
||||
with open("output.html", "w", encoding="utf-8") as html_file:
|
||||
html_file.write(html_content)
|
||||
|
||||
self.assertContains(response, "Federal", count=48)
|
||||
# This may be a bit more robust
|
||||
self.assertContains(response, '<td class="field-generic_org_type">Federal</td>', count=1)
|
||||
self.assertContains(response, '<td class="field-converted_generic_org_type">federal</td>', count=1)
|
||||
# Now let's make sure the long description does not exist
|
||||
self.assertNotContains(response, "Federal: an agency of the U.S. government")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue