Respond to PR feedback

This commit is contained in:
Seamus Johnston 2023-06-16 13:56:19 -05:00
parent c86b6e9746
commit d2683ef32c
No known key found for this signature in database
GPG key ID: 2F21225985069105
2 changed files with 6 additions and 4 deletions

View file

@ -58,7 +58,8 @@ class DomainAdmin(AuditedAdmin):
readonly_fields = ["state"] readonly_fields = ["state"]
def response_change(self, request, obj): def response_change(self, request, obj):
if "_place_client_hold" in request.POST: ACTION_BUTTON = "_place_client_hold"
if ACTION_BUTTON in request.POST:
try: try:
obj.place_client_hold() obj.place_client_hold()
except Exception as err: except Exception as err:

View file

@ -37,7 +37,7 @@ class TestDomainCreation(TestCase):
""" """
Scenario: A registrant checks the status of a newly approved domain Scenario: A registrant checks the status of a newly approved domain
Given that no domain object exists in the registry Given that no domain object exists in the registry
When `domain.is_active()` is called When a property is accessed
Then Domain sends `commands.CreateDomain` to the registry Then Domain sends `commands.CreateDomain` to the registry
And `domain.state` is set to `CREATED` And `domain.state` is set to `CREATED`
And `domain.is_active()` returns False And `domain.is_active()` returns False
@ -74,8 +74,9 @@ class TestRegistrantContacts(TestCase):
@skip("not implemented yet") @skip("not implemented yet")
def test_no_security_email(self): def test_no_security_email(self):
""" """
Scenario: Registrant declines to add a security contact email Scenario: Registrant has not added a security contact email
Given the domain exists in the registry Given `domain.security_contact` has not been set to anything
When the domain is created in the registry
Then the domain has a valid security contact with CISA defaults Then the domain has a valid security contact with CISA defaults
And disclose flags are set to keep the email address hidden And disclose flags are set to keep the email address hidden
""" """