mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-29 14:06:32 +02:00
Fix a commented out portion to fix tests hopefully
This commit is contained in:
parent
210d5293d6
commit
d072b143ea
2 changed files with 19 additions and 22 deletions
|
@ -2025,22 +2025,6 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
|
||||
data = data_response.res_data[0]
|
||||
|
||||
return {
|
||||
"auth_info": getattr(data, "auth_info", ...),
|
||||
"_contacts": getattr(data, "contacts", ...),
|
||||
"cr_date": getattr(data, "cr_date", ...),
|
||||
"ex_date": getattr(data, "ex_date", ...),
|
||||
"_hosts": getattr(data, "hosts", ...),
|
||||
"name": getattr(data, "name", ...),
|
||||
"registrant": getattr(data, "registrant", ...),
|
||||
"statuses": [epp.Status(state="pendingDelete", description="", lang="en")],
|
||||
"tr_date": getattr(data, "tr_date", ...),
|
||||
"up_date": getattr(data, "up_date", ...),
|
||||
}
|
||||
|
||||
### Original code
|
||||
# data = data_response.res_data[0]
|
||||
|
||||
# return {
|
||||
# "auth_info": getattr(data, "auth_info", ...),
|
||||
# "_contacts": getattr(data, "contacts", ...),
|
||||
|
@ -2049,11 +2033,27 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
# "_hosts": getattr(data, "hosts", ...),
|
||||
# "name": getattr(data, "name", ...),
|
||||
# "registrant": getattr(data, "registrant", ...),
|
||||
# "statuses": getattr(data, "statuses", ...),
|
||||
# "statuses": [epp.Status(state="pendingDelete", description="", lang="en")],
|
||||
# "tr_date": getattr(data, "tr_date", ...),
|
||||
# "up_date": getattr(data, "up_date", ...),
|
||||
# }
|
||||
|
||||
## Original code
|
||||
data = data_response.res_data[0]
|
||||
|
||||
return {
|
||||
"auth_info": getattr(data, "auth_info", ...),
|
||||
"_contacts": getattr(data, "contacts", ...),
|
||||
"cr_date": getattr(data, "cr_date", ...),
|
||||
"ex_date": getattr(data, "ex_date", ...),
|
||||
"_hosts": getattr(data, "hosts", ...),
|
||||
"name": getattr(data, "name", ...),
|
||||
"registrant": getattr(data, "registrant", ...),
|
||||
"statuses": getattr(data, "statuses", ...),
|
||||
"tr_date": getattr(data, "tr_date", ...),
|
||||
"up_date": getattr(data, "up_date", ...),
|
||||
}
|
||||
|
||||
def _clean_cache(self, cache, data_response):
|
||||
"""clean up the cache"""
|
||||
# remove null properties (to distinguish between "a value of None" and null)
|
||||
|
|
|
@ -2271,7 +2271,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
def test_error_when_approving_domain_in_pending_delete_state(self):
|
||||
"""If in pendingDelete state from in review -> approve not allowed."""
|
||||
|
||||
# 1. Create domain
|
||||
# 1. Create domain
|
||||
to_be_in_pending_deleted = completed_domain_request(
|
||||
status=DomainRequest.DomainRequestStatus.SUBMITTED, name="meoward1.gov"
|
||||
)
|
||||
|
@ -2282,9 +2282,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
to_be_in_pending_deleted.save()
|
||||
|
||||
# 3. Update request as a superuser
|
||||
request = self.factory.post(
|
||||
f"/admin/registrar/domainrequest/{to_be_in_pending_deleted.pk}/change/"
|
||||
)
|
||||
request = self.factory.post(f"/admin/registrar/domainrequest/{to_be_in_pending_deleted.pk}/change/")
|
||||
request.user = self.superuser
|
||||
request.session = {}
|
||||
|
||||
|
@ -2308,7 +2306,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
"Domain of same name is currently in pending delete state.",
|
||||
)
|
||||
|
||||
|
||||
@less_console_noise
|
||||
def test_no_error_when_saving_to_approved_and_domain_exists(self):
|
||||
"""The negative of the redundant admin check on model transition not allowed."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue