def test_parse_ipv4_address(self): """ Tests parsing of an ipv4 address into a network byte value """ address = "192.168.1.1" driver = WinDivert() driver.register() result = driver.parse_ipv4_address(address) self.assertEqual(struct.unpack(">I", inet_pton(socket.AF_INET, address))[0], result)
def test_parse_ipv4_address(self): """ Tests parsing of an ipv4 address into a network byte value """ address = "192.168.1.1" driver = WinDivert() driver.register() result = driver.parse_ipv4_address(address) self.assertEqual( struct.unpack(">I", inet_pton(socket.AF_INET, address))[0], result)