Fine details

This commit is contained in:
zandercymatics 2023-10-02 12:42:27 -06:00
parent 60cf20fc3d
commit 1cf5bc3eaa
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 9 additions and 2 deletions

View file

@ -668,7 +668,7 @@ class MockEppLib(TestCase):
) )
mockDataInfoHosts = fakedEppObject( mockDataInfoHosts = fakedEppObject(
"lastPw", cr_date=datetime.datetime(2023, 5, 25, 19, 45, 35) "lastPw", cr_date=datetime.datetime(2023, 8, 25, 19, 45, 35)
) )
def mockSend(self, _request, cleaned): def mockSend(self, _request, cleaned):

View file

@ -121,7 +121,7 @@ class TestDomainCache(MockEppLib):
# get and check hosts is set correctly # get and check hosts is set correctly
domain._get_property("hosts") domain._get_property("hosts")
self.assertEqual(domain._cache["hosts"], [expectedHostsDict]) self.assertEqual(domain._cache["hosts"], [expectedHostsDict])
self.assertEqual(domain._cache["contacts"], expectedContactsDict)
# invalidate cache # invalidate cache
domain._cache = {} domain._cache = {}
@ -662,6 +662,13 @@ class TestRegistrantContacts(MockEppLib):
self.mockedSendFunction.assert_has_calls(expected_calls, any_order=True) self.mockedSendFunction.assert_has_calls(expected_calls, any_order=True)
def test_updates_security_email(self): def test_updates_security_email(self):
"""
Scenario: Registrant replaces one valid security contact email with another
Given a domain exists in the registry with a user-added security email
When `domain.security_contact` is set equal to a PublicContact with a new
security contact email
Then Domain sends `commands.UpdateContact` to the registry
"""
security_contact = self.domain.get_default_security_contact() security_contact = self.domain.get_default_security_contact()
security_contact.email = "originalUserEmail@gmail.com" security_contact.email = "originalUserEmail@gmail.com"
security_contact.registry_id = "fail" security_contact.registry_id = "fail"