mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
Add tests for subdomain and ip logic
This commit is contained in:
parent
88cb4fc78a
commit
d532c389c0
2 changed files with 45 additions and 0 deletions
|
@ -634,6 +634,15 @@ class MockEppLib(TestCase):
|
|||
],
|
||||
addrs=["1.2.3.4", "2.3.4.5"],
|
||||
)
|
||||
infoDomainCheckHostIPCombo = fakedEppObject(
|
||||
"nameserversubdomain.gov",
|
||||
cr_date=datetime.datetime(2023, 5, 25, 19, 45, 35),
|
||||
contacts=[],
|
||||
hosts=[
|
||||
"ns1.nameserversubdomain.gov",
|
||||
"ns2.nameserversubdomain.gov",
|
||||
],
|
||||
)
|
||||
|
||||
# TODO-848: Fix naming
|
||||
extendedValues = False
|
||||
|
@ -650,6 +659,8 @@ class MockEppLib(TestCase):
|
|||
return MagicMock(res_data=[self.infoDomainNoHost])
|
||||
elif getattr(_request, "name", None) == "nameserverwithip.gov":
|
||||
return MagicMock(res_data=[self.infoDomainHasIP])
|
||||
elif getattr(_request, "name", None) == "namerserversubdomain.gov":
|
||||
return MagicMock(res_data=[self.infoDomainCheckHostIPCombo])
|
||||
# elif getattr(_request, "name", None) == "failednameserver.gov":
|
||||
# return MagicMock(res_data=[self.infoDomainUpdateFail])
|
||||
return MagicMock(res_data=[self.mockDataInfoDomain])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue