From a193c267f30f75c8b568477cbcc6aa94d3520651 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 10 Aug 2014 16:20:04 +0200 Subject: adjust tests --- test/test_platform_pf.py | 4 ++-- test/test_server.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_platform_pf.py b/test/test_platform_pf.py index d617cd87..2c4870f9 100644 --- a/test/test_platform_pf.py +++ b/test/test_platform_pf.py @@ -11,5 +11,5 @@ class TestLookup: p = tutils.test_data.path("data/pf01") d = open(p,"rb").read() assert pf.lookup("192.168.1.111", 40000, d) == ("5.5.5.5", 80) - assert not pf.lookup("192.168.1.112", 40000, d) - assert not 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) diff --git a/test/test_server.py b/test/test_server.py index cf50f280..fea6791d 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -480,7 +480,7 @@ class TestKillResponse(tservers.HTTPProxTest): class EResolver(tservers.TResolver): def original_addr(self, sock): - return None + raise RuntimeError("Could not resolve original destination.") class TestTransparentResolveError(tservers.TransparentProxTest): -- cgit v1.2.3