From 1445e1bf61e592b89890f68221df98c50f2b8dc3 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 20 Nov 2024 20:52:59 -0500 Subject: [PATCH] Fix unit tests --- src/registrar/tests/test_admin.py | 4 +++- src/registrar/tests/test_admin_request.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index 2677462df..84b85e412 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -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() diff --git a/src/registrar/tests/test_admin_request.py b/src/registrar/tests/test_admin_request.py index 9244fffcd..a903188f3 100644 --- a/src/registrar/tests/test_admin_request.py +++ b/src/registrar/tests/test_admin_request.py @@ -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")