django-orchestra/orchestra/apps/domains/tests/test_domains.py

19 lines
625 B
Python
Raw Normal View History

from orchestra.utils.tests import BaseTestCase
2014-05-08 16:59:35 +00:00
from ..models import Domain
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')
self.assertEqual(2, len(domain.subdomains.all()))
2014-05-08 16:59:35 +00:00
def test_render_zone(self):
account = self.create_account()
domain = Domain.objects.create(name='rostrepalid.org', account=account)
domain.render_zone()
2014-05-08 16:59:35 +00:00