diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-24 16:20:50 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-24 16:20:50 +1200 |
commit | e6aa9ff67582c00d2de03f65b47dd776cd602fb7 (patch) | |
tree | 17015dd564bfeb15a9cf2bf2d63641a1032b94ae /test/test_test.py | |
parent | 877b5a2d116c1ee0a8eb26191a65ff87f7146ae0 (diff) | |
download | mitmproxy-e6aa9ff67582c00d2de03f65b47dd776cd602fb7.tar.gz mitmproxy-e6aa9ff67582c00d2de03f65b47dd776cd602fb7.tar.bz2 mitmproxy-e6aa9ff67582c00d2de03f65b47dd776cd602fb7.zip |
Re-enable anchors.
Diffstat (limited to 'test/test_test.py')
-rw-r--r-- | test/test_test.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/test_test.py b/test/test_test.py index b9a9cfac..dcf980bc 100644 --- a/test/test_test.py +++ b/test/test_test.py @@ -38,7 +38,10 @@ class TestDaemonManual: class TestDaemon: @classmethod def setUpAll(self): - self.d = test.Daemon(staticdir=tutils.test_data.path("data")) + self.d = test.Daemon( + staticdir=tutils.test_data.path("data"), + anchors=[("/anchor/.*", "202")] + ) @classmethod def tearDownAll(self): @@ -47,6 +50,9 @@ class TestDaemon: def setUp(self): self.d.clear_log() + def getpath(self, path): + return requests.get("http://localhost:%s/%s"%(self.d.port, path)) + def get(self, spec): return requests.get("http://localhost:%s/p/%s"%(self.d.port, spec)) @@ -72,5 +78,7 @@ class TestDaemon: assert rsp.status_code == 200 assert rsp.content.strip() == "testfile" - + def test_anchor(self): + rsp = self.getpath("anchor/foo") + assert rsp.status_code == 202 |