From 36c19d65bf4edef8c74707123f4867f5eeae4e8f Mon Sep 17 00:00:00 2001 From: CocoByte Date: Tue, 26 Nov 2024 13:31:01 -0700 Subject: [PATCH] fixes for unit test (and admin change form) --- src/registrar/admin.py | 2 +- src/registrar/tests/test_admin_domain.py | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 168b266cf..8959c8f8d 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1579,7 +1579,7 @@ class DomainInformationAdmin(ListHeaderAdmin, ImportExportModelAdmin): }, ), (".gov domain", {"fields": ["domain"]}), - ("Contacts", {"fields": ["generic_org_type", "other_contacts", "no_other_contacts_rationale"]}), + ("Contacts", {"fields": ["senior_official", "other_contacts", "no_other_contacts_rationale"]}), ("Background info", {"fields": ["anything_else"]}), ( "Type of organization", diff --git a/src/registrar/tests/test_admin_domain.py b/src/registrar/tests/test_admin_domain.py index f02b59a91..3e716c247 100644 --- a/src/registrar/tests/test_admin_domain.py +++ b/src/registrar/tests/test_admin_domain.py @@ -32,9 +32,6 @@ from unittest.mock import ANY, call, patch import boto3_mocking # type: ignore import logging -logger = logging.getLogger(__name__) - - class TestDomainAdminAsStaff(MockEppLib): """Test DomainAdmin class as staff user. @@ -494,7 +491,7 @@ class TestDomainAdminWithClient(TestCase): self.assertContains(response, "This table contains all approved domains in the .gov registrar.") self.assertContains(response, "Show more") - @less_console_noise_decorator + # @less_console_noise_decorator def test_contact_fields_on_domain_change_form_have_detail_table(self): """Tests if the contact fields in the inlined Domain information have the detail table which displays title, email, and phone""" @@ -726,9 +723,9 @@ class TestDomainAdminWithClient(TestCase): domain_request.approve() response = self.client.get("/admin/registrar/domain/") - # There are 4 template references to Federal (4) plus four references in the table - # for our actual domain_request - self.assertContains(response, "Federal", count=56) + # The total count should reflect the fact that we are pulling from portfolio + # data when portfolios are present + self.assertContains(response, "Federal", count=98) # This may be a bit more robust self.assertContains(response, 'Federal', count=1) # Now let's make sure the long description does not exist