mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-24 21:29:53 +02:00
removed unneeded comments and updated others
This commit is contained in:
parent
d476a1b377
commit
e6b94e83a4
2 changed files with 7 additions and 7 deletions
|
@ -48,9 +48,10 @@ class MockEppLib(TestCase):
|
|||
)
|
||||
|
||||
def mockSend(self, _request, cleaned):
|
||||
""""""
|
||||
print("in mock send patch is ")
|
||||
print(_request)
|
||||
"""Mocks the registry.send function used inside of domain.py
|
||||
registry is imported from epplibwrapper
|
||||
returns objects that simulate what would be in a epp response
|
||||
but only relevant pieces for tests"""
|
||||
if isinstance(_request, commands.InfoDomain):
|
||||
if getattr(_request, "name", None) == "security.gov":
|
||||
return MagicMock(res_data=[self.infoDomainNoContact])
|
||||
|
@ -62,8 +63,8 @@ class MockEppLib(TestCase):
|
|||
and getattr(_request, "id", None) == "fail"
|
||||
and self.mockedSendFunction.call_count == 3
|
||||
):
|
||||
print("raising error")
|
||||
|
||||
#use this for when a contact is being updated
|
||||
#sets the second send() to fail
|
||||
raise RegistryError(code=ErrorCode.OBJECT_EXISTS)
|
||||
return MagicMock(res_data=[self.mockDataInfoHosts])
|
||||
|
||||
|
|
|
@ -272,13 +272,12 @@ class DomainSecurityEmailView(DomainPermissionView, FormMixin):
|
|||
|
||||
# Set the security email from the form
|
||||
new_email = form.cleaned_data.get("security_email", "")
|
||||
|
||||
domain = self.get_object()
|
||||
contact = domain.security_contact
|
||||
contact.email = new_email
|
||||
contact.save()
|
||||
|
||||
##update security email here
|
||||
# call the setter
|
||||
messages.success(
|
||||
self.request, "The security email for this domain have been updated."
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue