mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-15 05:54:11 +02:00
test without mock
This commit is contained in:
parent
3884536869
commit
09c9e1eed8
1 changed files with 23 additions and 0 deletions
|
@ -5,9 +5,12 @@ from registrar.models import (
|
||||||
DomainApplication,
|
DomainApplication,
|
||||||
User,
|
User,
|
||||||
Domain,
|
Domain,
|
||||||
|
PublicContact
|
||||||
)
|
)
|
||||||
from unittest import skip
|
from unittest import skip
|
||||||
|
|
||||||
|
##delete me
|
||||||
|
from django.core.cache import cache
|
||||||
|
|
||||||
class TestDomain(TestCase):
|
class TestDomain(TestCase):
|
||||||
def test_empty_create_fails(self):
|
def test_empty_create_fails(self):
|
||||||
|
@ -21,6 +24,26 @@ class TestDomain(TestCase):
|
||||||
# this assertion will not work -- for now, the fact that the
|
# this assertion will not work -- for now, the fact that the
|
||||||
# above command didn't error out is proof enough
|
# above command didn't error out is proof enough
|
||||||
# self.assertEquals(domain.state, Domain.State.DRAFTED)
|
# self.assertEquals(domain.state, Domain.State.DRAFTED)
|
||||||
|
def test_cache(self):
|
||||||
|
# domain, _= Domain.objects.get_or_create(name="igorville.gov")
|
||||||
|
|
||||||
|
|
||||||
|
domain, _ = Domain.objects.get_or_create(name="igorville.gov")
|
||||||
|
sec=domain.security_contact
|
||||||
|
print(sec)
|
||||||
|
print("domain cache is as follows\n")
|
||||||
|
|
||||||
|
#would have expected the cache to contain the value
|
||||||
|
print(domain._cache)
|
||||||
|
print("\n")
|
||||||
|
domain.registrant = 'abc123'
|
||||||
|
r=domain.registrant
|
||||||
|
print(domain._cache)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@skip("cannot activate a domain without mock registry")
|
@skip("cannot activate a domain without mock registry")
|
||||||
def test_get_status(self):
|
def test_get_status(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue