Пример #1
0
 def test_ns_from_array(self):
     zp = ZoneParser('orangebox.com')
     zp.ns_from_array(['@', 'IN', 'NS', '10.0.10.55'])
     self.assertEqual(zp.zone.contents['NS'], [{
         'addr': '10.0.10.55',
         'alias': '@'
     }])
Пример #2
0
 def test_ns_from_array_with_ttl(self):
     zp = ZoneParser('orangebox.com')
     zp.ns_from_array(['@', '300', 'IN', 'NS', '10.0.10.55'])
     self.assertEqual(zp.zone.contents['NS'], [{'addr': '10.0.10.55',
                                               'alias': '@',
                                               'ttl': '300'}])