2014-10-03 17:37:36 +00:00
|
|
|
from orchestra.utils.tests import BaseTestCase
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
from ..models import Domain
|
|
|
|
|
|
|
|
|
2014-10-03 17:37:36 +00:00
|
|
|
class DomainTest(BaseTestCase):
|
|
|
|
def test_top_relation(self):
|
|
|
|
account = self.create_account()
|
|
|
|
domain = Domain.objects.create(name='rostrepalid.org', account=account)
|
2014-05-08 16:59:35 +00:00
|
|
|
Domain.objects.create(name='www.rostrepalid.org')
|
|
|
|
Domain.objects.create(name='mail.rostrepalid.org')
|
2014-10-03 17:37:36 +00:00
|
|
|
self.assertEqual(2, len(domain.subdomains.all()))
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
def test_render_zone(self):
|
2014-10-03 17:37:36 +00:00
|
|
|
account = self.create_account()
|
|
|
|
domain = Domain.objects.create(name='rostrepalid.org', account=account)
|
|
|
|
domain.render_zone()
|
2014-05-08 16:59:35 +00:00
|
|
|
|