Fix unit tests

This commit is contained in:
Rachid Mrad 2024-11-20 20:52:59 -05:00
parent e6035ed0b2
commit 1445e1bf61
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -654,7 +654,9 @@ class TestDomainInformationAdmin(TestCase):
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
# Test for the copy link
self.assertContains(response, "copy-to-clipboard", count=3)
# We expect 3 in the form + 2 from the js module copy-to-clipboard.js
# that gets pulled in the test in django.contrib.staticfiles.finders.FileSystemFinder
self.assertContains(response, "copy-to-clipboard", count=5)
# cleanup this test
domain_info.delete()

View file

@ -1526,7 +1526,9 @@ class TestDomainRequestAdmin(MockEppLib):
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
# Test for the copy link
self.assertContains(response, "copy-to-clipboard", count=5)
# We expect 5 in the form + 2 from the js module copy-to-clipboard.js
# that gets pulled in the test in django.contrib.staticfiles.finders.FileSystemFinder
self.assertContains(response, "copy-to-clipboard", count=7)
# Test that Creator counts display properly
self.assertNotContains(response, "Approved domains")