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

View file

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