From f85730af25398bf67b063bc717a0f834a42bd654 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Mon, 29 Jan 2024 14:54:39 -0800 Subject: [PATCH] changed VIP to verified by staff --- src/registrar/admin.py | 4 ++-- src/registrar/tests/test_admin.py | 14 +++++++------- src/registrar/tests/test_migrations.py | 6 +++--- src/registrar/tests/test_models.py | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index b8e08284f..325081575 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1295,7 +1295,7 @@ class DraftDomainAdmin(ListHeaderAdmin): search_help_text = "Search by draft domain name." -class VeryImportantPersonAdmin(ListHeaderAdmin): +class VerifiedByStaffAdmin(ListHeaderAdmin): list_display = ("email", "requestor", "truncated_notes", "created_at") search_fields = ["email"] search_help_text = "Search by email." @@ -1338,4 +1338,4 @@ admin.site.register(models.Website, WebsiteAdmin) admin.site.register(models.PublicContact, AuditedAdmin) admin.site.register(models.DomainApplication, DomainApplicationAdmin) admin.site.register(models.TransitionDomain, TransitionDomainAdmin) -admin.site.register(models.VerifiedByStaff, VeryImportantPersonAdmin) +admin.site.register(models.VerifiedByStaff, VerifiedByStaffAdmin) diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index 5ca7866f7..0a99c039a 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -14,11 +14,11 @@ from registrar.admin import ( ContactAdmin, DomainInformationAdmin, UserDomainRoleAdmin, - VeryImportantPersonAdmin, + VerifiedByStaff, ) from registrar.models import Domain, DomainApplication, DomainInformation, User, DomainInvitation, Contact, Website from registrar.models.user_domain_role import UserDomainRole -from registrar.models.verified_by_staff import VeryImportantPerson +from registrar.models.verified_by_staff import VerifiedByStaffAdmin from .common import ( MockSESClient, AuditedAdminMockData, @@ -1820,7 +1820,7 @@ class ContactAdminTest(TestCase): User.objects.all().delete() -class VeryImportantPersonAdminTestCase(TestCase): +class VerifiedByStaffAdminTestCase(TestCase): def setUp(self): self.superuser = create_superuser() self.factory = RequestFactory() @@ -1829,13 +1829,13 @@ class VeryImportantPersonAdminTestCase(TestCase): self.client.force_login(self.superuser) # Create an instance of the admin class - admin_instance = VeryImportantPersonAdmin(model=VeryImportantPerson, admin_site=None) + admin_instance = VerifiedByStaffAdmin(model=VerifiedB, admin_site=None) - # Create a VeryImportantPerson instance - vip_instance = VeryImportantPerson(email="test@example.com", notes="Test Notes") + # Create a VerifiedByStaff instance + vip_instance = VerifiedByStaff(email="test@example.com", notes="Test Notes") # Create a request object - request = self.factory.post("/admin/yourapp/veryimportantperson/add/") + request = self.factory.post("/admin/yourapp/VerifiedByStaff/add/") request.user = self.superuser # Call the save_model method diff --git a/src/registrar/tests/test_migrations.py b/src/registrar/tests/test_migrations.py index cf28aa81a..98c9c1271 100644 --- a/src/registrar/tests/test_migrations.py +++ b/src/registrar/tests/test_migrations.py @@ -43,9 +43,9 @@ class TestGroups(TestCase): "change_user", "delete_userdomainrole", "view_userdomainrole", - "add_veryimportantperson", - "change_veryimportantperson", - "delete_veryimportantperson", + "add_verfiedbystaff", + "change_verfiedbystaff", + "delete_verfiedbystaff", "change_website", ] diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py index d84b241ec..d0005cbd5 100644 --- a/src/registrar/tests/test_models.py +++ b/src/registrar/tests/test_models.py @@ -16,7 +16,7 @@ from registrar.models import ( import boto3_mocking from registrar.models.transition_domain import TransitionDomain -from registrar.models.verified_by_staff import VeryImportantPerson # type: ignore +from registrar.models.verified_by_staff import VerifiedByStaff # type: ignore from .common import MockSESClient, less_console_noise, completed_application from django_fsm import TransitionNotAllowed @@ -656,7 +656,7 @@ class TestUser(TestCase): def test_identity_verification_with_very_important_person(self): """A Very Important Person should return False when tested with class method needs_identity_verification""" - VeryImportantPerson.objects.get_or_create(email=self.user.email) + VerifiedByStaff.objects.get_or_create(email=self.user.email) self.assertFalse(User.needs_identity_verification(self.user.email, self.user.username)) def test_identity_verification_with_invited_user(self):