Пример #1
0
 def create_domain(cls, suffix=None, **kwargs):
     kwargs.setdefault('owner', cls.create_user())
     kwargs.setdefault('name', cls.random_domain_name(suffix))
     domain = Domain(**kwargs)
     domain.save()
     return domain
Пример #2
0
 def createDomain(cls, owner=None, port=80):
     if owner is None:
         owner = cls.createUser(username=None)
     domain = Domain(name=cls.generateDomainname(), owner=owner)
     domain.save()
     return domain