Fix test cases broken by recent merge

This commit is contained in:
zandercymatics 2023-12-19 09:12:32 -07:00
parent 63a58ae182
commit 724b549d70
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -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()