def testAddressEncoding(self): self.assertRaises(AddrFormatError, tools.EncodeAddress, 'TEST123') self.assertEqual(tools.EncodeAddress('192.168.0.255'), six.b('\xc0\xa8\x00\xff'))
def set_framed_ip_addr(self, ipaddr): if ipaddr: self.AddAttribute(8, tools.EncodeAddress(ipaddr))