mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
formatted code
This commit is contained in:
parent
944c82b9f9
commit
3107a9213d
3 changed files with 7 additions and 11 deletions
|
@ -236,11 +236,7 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
cur_exp_date = date.today()
|
||||
|
||||
# create RenewDomain request
|
||||
request = commands.RenewDomain(
|
||||
name=self.name,
|
||||
cur_exp_date=cur_exp_date,
|
||||
period = epp.Period(length, unit)
|
||||
)
|
||||
request = commands.RenewDomain(name=self.name, cur_exp_date=cur_exp_date, period=epp.Period(length, unit))
|
||||
|
||||
try:
|
||||
# update expiration date in registry, and set the updated
|
||||
|
|
|
@ -1972,7 +1972,7 @@ class TestExpirationDate(MockEppLib):
|
|||
|
||||
def test_expiration_date_setter_not_implemented(self):
|
||||
"""assert that the setter for expiration date is not implemented and will raise error"""
|
||||
with self.assertRaises(NotImplementedError) as err:
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self.domain.registry_expiration_date = datetime.date.today()
|
||||
|
||||
def test_renew_domain(self):
|
||||
|
@ -1984,7 +1984,7 @@ class TestExpirationDate(MockEppLib):
|
|||
|
||||
def test_renew_domain_error(self):
|
||||
"""assert that the renew_domain raises an exception when registry raises error"""
|
||||
with self.assertRaises(RegistryError) as err:
|
||||
with self.assertRaises(RegistryError):
|
||||
self.domain_w_error.renew_domain()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue