mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
Fix test cases broken by recent merge
This commit is contained in:
parent
63a58ae182
commit
724b549d70
1 changed files with 8 additions and 18 deletions
|
@ -15,15 +15,7 @@ from registrar.admin import (
|
||||||
ContactAdmin,
|
ContactAdmin,
|
||||||
UserDomainRoleAdmin,
|
UserDomainRoleAdmin,
|
||||||
)
|
)
|
||||||
from registrar.models import (
|
from registrar.models import Domain, DomainApplication, DomainInformation, User, DomainInvitation, Contact, Website
|
||||||
Domain,
|
|
||||||
DomainApplication,
|
|
||||||
DomainInformation,
|
|
||||||
User,
|
|
||||||
DomainInvitation,
|
|
||||||
Contact,
|
|
||||||
Website
|
|
||||||
)
|
|
||||||
from registrar.models.user_domain_role import UserDomainRole
|
from registrar.models.user_domain_role import UserDomainRole
|
||||||
from .common import (
|
from .common import (
|
||||||
completed_application,
|
completed_application,
|
||||||
|
@ -844,7 +836,6 @@ class TestDomainApplicationAdmin(MockEppLib):
|
||||||
# Assert that DomainInformation got Deleted
|
# Assert that DomainInformation got Deleted
|
||||||
with self.assertRaises(DomainInformation.DoesNotExist):
|
with self.assertRaises(DomainInformation.DoesNotExist):
|
||||||
domain_information.refresh_from_db()
|
domain_information.refresh_from_db()
|
||||||
|
|
||||||
|
|
||||||
def test_has_correct_filters(self):
|
def test_has_correct_filters(self):
|
||||||
"""Tests if DomainApplicationAdmin has the correct filters"""
|
"""Tests if DomainApplicationAdmin has the correct filters"""
|
||||||
|
@ -908,7 +899,7 @@ class TestDomainApplicationAdmin(MockEppLib):
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"parameter_name": "investigator",
|
"parameter_name": "investigator",
|
||||||
"parameter_value": "SomeGuy first_name:investigator SomeGuy last_name:investigator",
|
"parameter_value": "SomeGuy first_name:creator SomeGuy last_name:creator",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -938,15 +929,14 @@ class TestDomainApplicationAdmin(MockEppLib):
|
||||||
follow=True,
|
follow=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
expected_name = "SomeGuy first_name:investigator SomeGuy last_name:investigator"
|
expected_name = "SomeGuy first_name:creator SomeGuy last_name:creator"
|
||||||
# We expect to see this four times, two of them are from the html for the filter,
|
# We expect to see this six times, two of them are from the html for the filter,
|
||||||
# the other two are the html from the list entry in the table.
|
# two are from the page content, and the other two are the html from the list entry in the table.
|
||||||
self.assertContains(response, expected_name, count=4)
|
self.assertContains(response, expected_name, count=6)
|
||||||
|
|
||||||
# Check that we don't also get the thing we aren't filtering for.
|
# Check that we don't also get the thing we aren't filtering for.
|
||||||
# We expect to see this two times, two of them are from the html for the filter.
|
unexpected_name = "BadGuy first_name:creator BadGuy last_name:creator"
|
||||||
unexpected_name = "BadGuy first_name:investigator BadGuy last_name:investigator"
|
self.assertContains(response, unexpected_name, count=0)
|
||||||
self.assertContains(response, unexpected_name, count=2)
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super().tearDown()
|
super().tearDown()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue