def test_naptr_from_array(self): zp = ZoneParser('example.com') zcontents = '@ 3200 IN NAPTR 1 1 "S" "SIP+D2T" "" _sip._tcp'.split(' ') zp.naptr_from_array(zcontents) self.assertEqual(zp.zone.contents['NAPTR'], [{'alias': '@', 'order': '1', 'pref': '1', 'flag': '"S"', 'params': '"SIP+D2T"', 'regexp': '""', 'ttl': '3200', 'replace': '_sip._tcp'}])
def test_naptr_from_array(self): zp = ZoneParser('example.com') zcontents = '@ 3200 IN NAPTR 1 1 "S" "SIP+D2T" "" _sip._tcp'.split(' ') zp.naptr_from_array(zcontents) self.assertEqual(zp.zone.contents['NAPTR'], [{ 'alias': '@', 'order': '1', 'pref': '1', 'flag': '"S"', 'params': '"SIP+D2T"', 'regexp': '""', 'ttl': '3200', 'replace': '_sip._tcp' }])