def test_a_from_array(self): zp = ZoneParser('orangebox.com') zp.a_from_array(self.ez[7].split()) self.assertEqual(zp.zone.contents['A'], [{ 'addr': '10.0.10.55', 'alias': 'ns' }])
def test_ellis_a_from_array(self): zp = ZoneParser('offline.cw-ngv.com') zp.a_from_array(u'ellis-0 300 IN A 54.73.45.41'.split(' ')) self.assertEqual(zp.zone.contents['A'], [{ 'ttl': '300', 'addr': '54.73.45.41', 'alias': 'ellis-0' }])
def test_a_from_array_with_ttl(self): zp = ZoneParser('orangebox.com') zp.a_from_array(['ns', '300', 'IN', 'A', '10.0.10.55']) self.assertEqual(zp.zone.contents['A'], [{ 'addr': '10.0.10.55', 'alias': 'ns', 'ttl': '300' }])
def test_a_from_array(self): zp = ZoneParser('orangebox.com') zp.a_from_array(self.ez[7].split()) self.assertEqual(zp.zone.contents['A'], [{'addr': '10.0.10.55', 'alias': 'ns'}])
def test_ellis_a_from_array(self): zp = ZoneParser('offline.cw-ngv.com') zp.a_from_array(u'ellis-0 300 IN A 54.73.45.41'.split(' ')) self.assertEqual(zp.zone.contents['A'], [{'ttl': '300', 'addr': '54.73.45.41', 'alias': 'ellis-0'}])
def test_a_from_array_with_ttl(self): zp = ZoneParser('orangebox.com') zp.a_from_array(['ns', '300', 'IN', 'A', '10.0.10.55']) self.assertEqual(zp.zone.contents['A'], [{'addr': '10.0.10.55', 'alias': 'ns', 'ttl': '300'}])