Fix tests for DomainInvitationAdmin

This commit is contained in:
Rachid Mrad 2023-12-05 19:38:19 -05:00
parent 00c04783b5
commit a27eb7c3ae
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF

View file

@ -877,12 +877,14 @@ class DomainInvitationAdminTest(TestCase):
)
# Assert that the filters are added
self.assertContains(response, "invited", count=4)
self.assertContains(response, "retrieved", count=4)
self.assertContains(response, "invited", count=2)
self.assertContains(response, "Invited", count=2)
self.assertContains(response, "retrieved", count=2)
self.assertContains(response, "Retrieved", count=2)
# Check for the HTML context specificially
invited_html = '<a href="?status__exact=invited">invited</a>'
retrieved_html = '<a href="?status__exact=retrieved">retrieved</a>'
invited_html = '<a href="?status__exact=invited">Invited</a>'
retrieved_html = '<a href="?status__exact=retrieved">Retrieved</a>'
self.assertContains(response, invited_html, count=1)
self.assertContains(response, retrieved_html, count=1)