diff options
author | Jim Shaver <dcypherd@gmail.com> | 2015-06-23 21:48:05 -0500 |
---|---|---|
committer | Jim Shaver <dcypherd@gmail.com> | 2015-06-23 21:48:05 -0500 |
commit | 080e4534253338c94e6d8c86cb3679ff15410f85 (patch) | |
tree | 6322fb822332b4135f0ff14de8c2d7137016f734 /test/test_platform_pf.py | |
parent | db5c0b210b0133d7cd58124c727dbc24480e2568 (diff) | |
parent | 074d8d7c7463cdb1f0a90e165a4b3ada3554b4c2 (diff) | |
download | mitmproxy-080e4534253338c94e6d8c86cb3679ff15410f85.tar.gz mitmproxy-080e4534253338c94e6d8c86cb3679ff15410f85.tar.bz2 mitmproxy-080e4534253338c94e6d8c86cb3679ff15410f85.zip |
Merge branch 'master' into hardfailvenv
Conflicts:
dev
Diffstat (limited to 'test/test_platform_pf.py')
-rw-r--r-- | test/test_platform_pf.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/test_platform_pf.py b/test/test_platform_pf.py index 2c4870f9..3250b035 100644 --- a/test/test_platform_pf.py +++ b/test/test_platform_pf.py @@ -1,4 +1,5 @@ -import tutils, sys +import tutils +import sys from libmproxy.platform import pf @@ -6,10 +7,20 @@ class TestLookup: def test_simple(self): if sys.platform == "freebsd10": p = tutils.test_data.path("data/pf02") - d = open(p,"rb").read() + d = open(p, "rb").read() else: p = tutils.test_data.path("data/pf01") - d = open(p,"rb").read() + d = open(p, "rb").read() assert pf.lookup("192.168.1.111", 40000, d) == ("5.5.5.5", 80) - tutils.raises("Could not resolve original destination", pf.lookup, "192.168.1.112", 40000, d) - tutils.raises("Could not resolve original destination", pf.lookup, "192.168.1.111", 40001, d) + tutils.raises( + "Could not resolve original destination", + pf.lookup, + "192.168.1.112", + 40000, + d) + tutils.raises( + "Could not resolve original destination", + pf.lookup, + "192.168.1.111", + 40001, + d) |