From d84e5d9a39e3ef691e7c0b04f8ab314d063cae56 Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Tue, 23 Jul 2024 16:06:25 -0400 Subject: [PATCH] fixed tests and linted --- src/registrar/forms/portfolio.py | 2 +- src/registrar/tests/test_admin.py | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/registrar/forms/portfolio.py b/src/registrar/forms/portfolio.py index 980bc8580..3cd65c0c3 100644 --- a/src/registrar/forms/portfolio.py +++ b/src/registrar/forms/portfolio.py @@ -102,4 +102,4 @@ class PortfolioOrgAddressForm(forms.ModelForm): # """ # old_value = self.initial.get(field_name, None) # new_value = self.cleaned_data.get(field_name, None) - # return old_value == new_value \ No newline at end of file + # return old_value == new_value diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index 3d5d988aa..979a40df3 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -3665,9 +3665,6 @@ class TestMyUserAdmin(MockDb): "fields": ( "is_active", "groups", - "portfolio", - "portfolio_roles", - "portfolio_additional_permissions", ) }, ), @@ -3766,7 +3763,7 @@ class TestMyUserAdmin(MockDb): expected_href = reverse("admin:registrar_domain_change", args=[domain_deleted.pk]) self.assertNotContains(response, expected_href) - def test_analyst_can_see_selects_for_portfolio_role_and_permissions_in_user_form(self): + def test_analyst_cannot_see_selects_for_portfolio_role_and_permissions_in_user_form(self): """Can only test for the presence of a base element. The multiselects and the h2->h3 conversion are all dynamically generated.""" @@ -3779,8 +3776,8 @@ class TestMyUserAdmin(MockDb): self.assertEqual(response.status_code, 200) - self.assertContains(response, "Portfolio roles:") - self.assertContains(response, "Portfolio additional permissions:") + self.assertNotContains(response, "Portfolio roles:") + self.assertNotContains(response, "Portfolio additional permissions:") class AuditedAdminTest(TestCase):