mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 01:27:03 +02:00
changed VIP to verified by staff
This commit is contained in:
parent
7c63d9c21b
commit
f85730af25
4 changed files with 14 additions and 14 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
]
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue