diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-06-25 21:16:47 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-06-25 21:16:47 +0200 |
commit | e69133f98c513a99c017ad561ea9195280e3f7c5 (patch) | |
tree | bc74a103593173eb170c71734f6844a22b0a6372 /test/test_utils.py | |
parent | 6405595ae8593a52f6b81d7f311044f113476d82 (diff) | |
download | mitmproxy-e69133f98c513a99c017ad561ea9195280e3f7c5.tar.gz mitmproxy-e69133f98c513a99c017ad561ea9195280e3f7c5.tar.bz2 mitmproxy-e69133f98c513a99c017ad561ea9195280e3f7c5.zip |
remove ntop windows workaround
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index a9a48cd0..971e5076 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -10,21 +10,3 @@ def test_cleanBin(): assert utils.cleanBin("\00ne") == ".ne" assert utils.cleanBin("\nne") == "\nne" assert utils.cleanBin("\nne", True) == ".ne" - -def test_ntop_pton(): - for family, ip_string, packed_ip in ( - (socket.AF_INET, - "127.0.0.1", - "\x7f\x00\x00\x01"), - (socket.AF_INET6, - "2001:0db8:85a3:08d3:1319:8a2e:0370:7344", - " \x01\r\xb8\x85\xa3\x08\xd3\x13\x19\x8a.\x03psD")): - assert ip_string == utils.inet_ntop(family, packed_ip) - assert packed_ip == utils.inet_pton(family, ip_string) - if hasattr(socket, "inet_ntop"): - ntop, pton = socket.inet_ntop, socket.inet_pton - delattr(socket,"inet_ntop") - delattr(socket,"inet_pton") - assert ip_string == utils.inet_ntop(family, packed_ip) - assert packed_ip == utils.inet_pton(family, ip_string) - socket.inet_ntop, socket.inet_pton = ntop, pton
\ No newline at end of file |