fixed some of the tests

This commit is contained in:
Alysia Broddrick 2023-09-11 18:13:56 -07:00
parent c1c7ff9698
commit e314c285d8
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7
2 changed files with 8 additions and 9 deletions

View file

@ -200,7 +200,7 @@ class Domain(TimeStampedModel, DomainHelper):
@expiration_date.setter # type: ignore @expiration_date.setter # type: ignore
def expiration_date(self, ex_date: date): def expiration_date(self, ex_date: date):
raise NotImplementedError() pass
@Cache @Cache
def password(self) -> str: def password(self) -> str:
@ -990,7 +990,7 @@ class Domain(TimeStampedModel, DomainHelper):
# extract properties from response # extract properties from response
# (Ellipsis is used to mean "null") # (Ellipsis is used to mean "null")
contact = { contact = {
"id": id, "id": domainContact.contact,
"type": domainContact.type, "type": domainContact.type,
"auth_info": getattr(data, "auth_info", ...), "auth_info": getattr(data, "auth_info", ...),
"cr_date": getattr(data, "cr_date", ...), "cr_date": getattr(data, "cr_date", ...),

View file

@ -149,7 +149,7 @@ class TestDomainCache(MockEppLib):
self.assertFalse("avail" in domain._cache.keys()) self.assertFalse("avail" in domain._cache.keys())
# using a setter should clear the cache # using a setter should clear the cache
domain.nameservers = [("", "")] domain.expiration_date = datetime.date.today()
self.assertEquals(domain._cache, {}) self.assertEquals(domain._cache, {})
# send should have been called only once # send should have been called only once
@ -213,11 +213,11 @@ class TestDomainCache(MockEppLib):
class TestDomainCreation(TestCase): class TestDomainCreation(TestCase):
"""Rule: An approved domain application must result in a domain""" """Rule: An approved domain application must result in a domain"""
# def setUp(self): def setUp(self):
# """ """
# Background: Background:
# Given that a valid domain application exists Given that a valid domain application exists
# """ """
def test_approved_application_creates_domain_locally(self): def test_approved_application_creates_domain_locally(self):
""" """
@ -280,7 +280,6 @@ class TestDomainCreation(TestCase):
self.assertIn("ok", domain.status) self.assertIn("ok", domain.status)
def tearDown(self) -> None: def tearDown(self) -> None:
Domain.objects.filter(name="igorville.gov").delete()
Domain.objects.all().delete() Domain.objects.all().delete()