def setUp(self): soa = SOA(primary=random_label( ), contact=random_label(), comment=random_label()) self.test_obj = Domain(name=random_label()) self.test_obj.save() self.test_obj.soa = soa self.test_obj.save()
def post_data(self): return { 'primary': random_label(), 'contact': random_label(), 'retry': '123', 'refresh': '123', 'comment': random_label() }
def setUp(self): soa = SOA(primary=random_label(), contact=random_label(), comment=random_label()) self.test_obj = Domain(name=random_label()) self.test_obj.save() self.test_obj.soa = soa self.test_obj.save()
def setUp(self): url_slug = "nameserver" dname = random_label() self.client = Client() self.url_slug = url_slug self.domain, create = Domain.objects.get_or_create(name=dname) while not create: dname = "a" + dname self.domain, create = Domain.objects.get_or_create(name=dname) server = random_label() self.test_obj, create = Nameserver.objects.get_or_create( server=server, domain=self.domain) while not create: server = "a" + server self.test_obj, create = Nameserver.objects.get_or_create( server=server, domain=self.domain)
def add_intr_ipv4(self, ip): intr = StaticInterface( label=random_label(), domain=self.domain, ip_str=ip, ip_type='4', system=self.s, mac='11:22:33:44:55:66' ) intr.clean() intr.save() return intr
def setUp(self): self.test_obj = SOA(primary=random_label(), contact=random_label(), comment=random_label()) self.test_obj.save()
def add_ptr_ipv6(self, ip): ptr = PTR(name=random_label(), ip_str=ip, ip_type='6') ptr.full_clean() ptr.save() return ptr
def post_data(self): return {'name': random_label()}
def add_ptr_ipv6(self, ip): ptr = PTR(name=random_label(), ip_str=ip, ip_type='6') ptr.full_clean() ptr.save() return ptr
def post_data(self): server = random_label() return {'server': server, 'domain': self.domain.pk}
def post_data(self): return { 'name': random_label() }