Exemplo n.º 1
0
 def setUp(self):
     self.url_slug = "domain"
     soa = SOA(primary=random_label(), contact=random_label(), description=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',
         'description': random_label()
     }
Exemplo n.º 3
0
 def setUp(self):
     self.url_slug = 'domain'
     soa = SOA(primary=random_label(),
               contact=random_label(),
               description=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)
Exemplo n.º 5
0
 def add_sreg_ipv4(self, ip):
     sreg = StaticReg(
         label=random_label(), domain=self.domain, ip_str=ip, ip_type='4',
         system=self.s
     )
     sreg.clean()
     sreg.save()
     return sreg
Exemplo n.º 6
0
 def add_sreg_ipv4(self, ip):
     sreg = StaticReg(label=random_label(),
                      domain=self.domain,
                      ip_str=ip,
                      ip_type='4',
                      system=self.s)
     sreg.clean()
     sreg.save()
     return sreg
Exemplo n.º 7
0
 def post_data(self):
     return {"name": random_label()}
 def post_data(self):
     server = random_label()
     return {'server': server, 'domain': self.domain.pk}
 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 setUp(self):
     self.url_slug = 'soa'
     self.test_obj = SOA(primary=random_label(),
                         contact=random_label(),
                         description=random_label())
     self.test_obj.save()
Exemplo n.º 11
0
 def add_ptr_ipv6(self, ip):
     ptr = PTR.objects.create(name=random_label(), ip_str=ip, ip_type='6')
     return ptr
Exemplo n.º 12
0
 def setUp(self):
     self.url_slug = 'soa'
     self.test_obj = SOA(primary=random_label(
     ), contact=random_label(), description=random_label())
     self.test_obj.save()
Exemplo n.º 13
0
 def post_data(self):
     return {'primary': random_label(), 'contact': random_label(), 'retry':
             '123', 'refresh': '123', 'description': random_label()}
Exemplo n.º 14
0
 def post_data(self):
     return {'name': random_label()}
Exemplo n.º 15
0
 def add_ptr_ipv6(self, ip):
     ptr = PTR.objects.create(
         name=random_label(), ip_str=ip, ip_type='6'
     )
     return ptr