mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-13 22:45:05 +02:00
Fix unit tests
This commit is contained in:
parent
7ac203913e
commit
c595405709
1 changed files with 2 additions and 10 deletions
|
@ -151,7 +151,7 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
|||
domain_information.save()
|
||||
|
||||
# We use filter here rather than just domain_information.domain just to get the latest data.
|
||||
domain = Domain.objects.filter(domain_info=domain_information)
|
||||
domain = Domain.objects.filter(domain_info=domain_information).get()
|
||||
|
||||
p = "userpass"
|
||||
self.client.login(username="staffuser", password=p)
|
||||
|
@ -164,10 +164,6 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, domain.name)
|
||||
|
||||
# Check for one of the inline headers
|
||||
expected_header = ".gov domain"
|
||||
self.assertContains(response, expected_header)
|
||||
|
||||
# Test for data. We only need to test one since its all interconnected.
|
||||
expected_organization_name = "MonkeySeeMonkeyDo"
|
||||
self.assertContains(response, expected_organization_name)
|
||||
|
@ -193,7 +189,7 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
|||
domain_information.save()
|
||||
|
||||
# We use filter here rather than just domain_information.domain just to get the latest data.
|
||||
domain = Domain.objects.filter(domain_info=domain_information)
|
||||
domain = Domain.objects.filter(domain_info=domain_information).get()
|
||||
|
||||
p = "adminpass"
|
||||
self.client.login(username="superuser", password=p)
|
||||
|
@ -206,10 +202,6 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, domain.name)
|
||||
|
||||
# Check for one of the inline headers
|
||||
expected_header = ".gov domain"
|
||||
self.assertContains(response, expected_header)
|
||||
|
||||
# Test for data. We only need to test one since its all interconnected.
|
||||
expected_organization_name = "MonkeySeeMonkeyDo"
|
||||
self.assertContains(response, expected_organization_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue