mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-16 15:55:58 +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()
|
domain_information.save()
|
||||||
|
|
||||||
# We use filter here rather than just domain_information.domain just to get the latest data.
|
# 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"
|
p = "userpass"
|
||||||
self.client.login(username="staffuser", password=p)
|
self.client.login(username="staffuser", password=p)
|
||||||
|
@ -164,10 +164,6 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, domain.name)
|
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.
|
# Test for data. We only need to test one since its all interconnected.
|
||||||
expected_organization_name = "MonkeySeeMonkeyDo"
|
expected_organization_name = "MonkeySeeMonkeyDo"
|
||||||
self.assertContains(response, expected_organization_name)
|
self.assertContains(response, expected_organization_name)
|
||||||
|
@ -193,7 +189,7 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
||||||
domain_information.save()
|
domain_information.save()
|
||||||
|
|
||||||
# We use filter here rather than just domain_information.domain just to get the latest data.
|
# 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"
|
p = "adminpass"
|
||||||
self.client.login(username="superuser", password=p)
|
self.client.login(username="superuser", password=p)
|
||||||
|
@ -206,10 +202,6 @@ class TestDomainAdmin(MockEppLib, WebTest):
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, domain.name)
|
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.
|
# Test for data. We only need to test one since its all interconnected.
|
||||||
expected_organization_name = "MonkeySeeMonkeyDo"
|
expected_organization_name = "MonkeySeeMonkeyDo"
|
||||||
self.assertContains(response, expected_organization_name)
|
self.assertContains(response, expected_organization_name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue