This commit is contained in:
zandercymatics 2023-09-28 08:01:37 -06:00
parent 60726f8c9b
commit d286fb6709
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 4 additions and 15 deletions

View file

@ -652,12 +652,8 @@ class Domain(TimeStampedModel, DomainHelper):
def isActive(self): def isActive(self):
return self.state == Domain.State.CREATED return self.state == Domain.State.CREATED
def map_epp_contact_to_public_contact( def map_epp_contact_to_public_contact(
self, self, contact: eppInfo.InfoContactResultData, contact_id, contact_type
contact: eppInfo.InfoContactResultData,
contact_id,
contact_type
): ):
"""Maps the Epp contact representation to a PublicContact object. """Maps the Epp contact representation to a PublicContact object.
@ -827,9 +823,7 @@ class Domain(TimeStampedModel, DomainHelper):
# If the for loop didn't do a return, # If the for loop didn't do a return,
# then we know that it doesn't exist within cache # then we know that it doesn't exist within cache
logger.info( logger.info(f"Requested contact {contact.registry_id} does not exist in cache.")
f"Requested contact {contact.registry_id} does not exist in cache."
)
return None return None
# ForeignKey on UserDomainRole creates a "permissions" member for # ForeignKey on UserDomainRole creates a "permissions" member for

View file

@ -1414,11 +1414,7 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest, MockEppLib):
domain_contact, _ = Domain.objects.get_or_create(name="freeman.gov") domain_contact, _ = Domain.objects.get_or_create(name="freeman.gov")
# Add current user to this domain # Add current user to this domain
_ = UserDomainRole( _ = UserDomainRole(user=self.user, domain=domain_contact, role="admin").save()
user=self.user,
domain = domain_contact,
role = "admin"
).save()
page = self.client.get( page = self.client.get(
reverse("domain-security-email", kwargs={"pk": domain_contact.id}) reverse("domain-security-email", kwargs={"pk": domain_contact.id})
) )
@ -1454,7 +1450,6 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest, MockEppLib):
@skip("Ticket 912 needs to fix this one") @skip("Ticket 912 needs to fix this one")
def test_domain_security_email_form(self): def test_domain_security_email_form(self):
"""Adding a security email works. """Adding a security email works.
Uses self.app WebTest because we need to interact with forms. Uses self.app WebTest because we need to interact with forms.
""" """
security_email_page = self.app.get( security_email_page = self.app.get(