From a58cff839835445ddb016106d5aaa04cbf8efcef Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 5 Oct 2023 08:47:18 -0600 Subject: [PATCH 1/4] Update content --- src/registrar/admin.py | 3 ++- .../templates/django/admin/domain_change_form.html | 6 +++--- src/registrar/tests/test_admin.py | 14 +++++++------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 275f67bb3..cec84fd01 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -784,7 +784,8 @@ def do_get_status(self, request, obj): else: self.message_user( request, - ("Domain statuses are %s" ". Thanks!") % statuses, + f"The registry statuses are {statuses}. " + "These statuses are from the EPP provider of the .gov registry." ) return HttpResponseRedirect(".") diff --git a/src/registrar/templates/django/admin/domain_change_form.html b/src/registrar/templates/django/admin/domain_change_form.html index ac26fc922..2ed3d7532 100644 --- a/src/registrar/templates/django/admin/domain_change_form.html +++ b/src/registrar/templates/django/admin/domain_change_form.html @@ -13,10 +13,10 @@ {% elif original.state == original.State.ON_HOLD %} {% endif %} - - + + {% if original.state != original.State.DELETED %} - + {% endif %} {{ block.super }} diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index def475536..a317bdf3b 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -108,12 +108,12 @@ def test_deletion_is_successful(self): ) self.assertEqual(response.status_code, 200) self.assertContains(response, domain.name) - self.assertContains(response, "Delete Domain in Registry") + self.assertContains(response, "Delete domain in registry") # Test the info dialog request = self.factory.post( "/admin/registrar/domain/{}/change/".format(domain.pk), - {"_delete_domain": "Delete Domain in Registry", "name": domain.name}, + {"_delete_domain": "Delete domain in registry", "name": domain.name}, follow=True, ) request.user = self.client @@ -148,12 +148,12 @@ def test_deletion_ready_fsm_failure(self): ) self.assertEqual(response.status_code, 200) self.assertContains(response, domain.name) - self.assertContains(response, "Delete Domain in Registry") + self.assertContains(response, "Delete domain in registry") # Test the error request = self.factory.post( "/admin/registrar/domain/{}/change/".format(domain.pk), - {"_delete_domain": "Delete Domain in Registry", "name": domain.name}, + {"_delete_domain": "Delete domain in registry", "name": domain.name}, follow=True, ) request.user = self.client @@ -193,12 +193,12 @@ def test_analyst_deletes_domain_idempotent(self): ) self.assertEqual(response.status_code, 200) self.assertContains(response, domain.name) - self.assertContains(response, "Delete Domain in Registry") + self.assertContains(response, "Delete domain in registry") # Test the info dialog request = self.factory.post( "/admin/registrar/domain/{}/change/".format(domain.pk), - {"_delete_domain": "Delete Domain in Registry", "name": domain.name}, + {"_delete_domain": "Delete domain in registry", "name": domain.name}, follow=True, ) request.user = self.client @@ -220,7 +220,7 @@ def test_analyst_deletes_domain_idempotent(self): # Test the info dialog request = self.factory.post( "/admin/registrar/domain/{}/change/".format(domain.pk), - {"_delete_domain": "Delete Domain in Registry", "name": domain.name}, + {"_delete_domain": "Delete domain in registry", "name": domain.name}, follow=True, ) request.user = self.client From af39441df4e435146c7ae1696c9e95be3fa15a8f Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 5 Oct 2023 08:58:46 -0600 Subject: [PATCH 2/4] Lint --- src/registrar/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index cec84fd01..5450d94ab 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -785,7 +785,7 @@ def do_get_status(self, request, obj): self.message_user( request, f"The registry statuses are {statuses}. " - "These statuses are from the EPP provider of the .gov registry." + "These statuses are from the provider of the .gov registry.", ) return HttpResponseRedirect(".") From 8f349aa19ccec1c7a295327393202b4ab8fff688 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 5 Oct 2023 11:29:05 -0600 Subject: [PATCH 3/4] Update domain.py --- src/registrar/models/domain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py index 59edb707a..85606ba88 100644 --- a/src/registrar/models/domain.py +++ b/src/registrar/models/domain.py @@ -718,7 +718,7 @@ def map_epp_contact_to_public_contact( if not isinstance(contact, eppInfo.InfoContactResultData): raise ContactError("Contact must be of type InfoContactResultData") - + # temp comment for push - will remove auth_info = contact.auth_info postal_info = contact.postal_info addr = postal_info.addr From 3c33b079f1e9a28fd911d7ac856bf0d955971568 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:11:51 -0600 Subject: [PATCH 4/4] Removed comment --- src/registrar/models/domain.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py index 85606ba88..82f2c2cf4 100644 --- a/src/registrar/models/domain.py +++ b/src/registrar/models/domain.py @@ -718,7 +718,6 @@ def map_epp_contact_to_public_contact( if not isinstance(contact, eppInfo.InfoContactResultData): raise ContactError("Contact must be of type InfoContactResultData") - # temp comment for push - will remove auth_info = contact.auth_info postal_info = contact.postal_info addr = postal_info.addr