diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-26 17:28:07 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-26 17:28:07 +1200 |
commit | 8f148b6b14e4fbf1dfa78111b624c131c9cd983d (patch) | |
tree | d58498f52cab8b2606b682ed41197fdd30e2cbef /test/test_pathoc.py | |
parent | a68b4498b87cbc8fc6f1c1c660df5fac09ca564e (diff) | |
download | mitmproxy-8f148b6b14e4fbf1dfa78111b624c131c9cd983d.tar.gz mitmproxy-8f148b6b14e4fbf1dfa78111b624c131c9cd983d.tar.bz2 mitmproxy-8f148b6b14e4fbf1dfa78111b624c131c9cd983d.zip |
Split pathod and pathoc daemon test suites out.
Diffstat (limited to 'test/test_pathoc.py')
-rw-r--r-- | test/test_pathoc.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py new file mode 100644 index 00000000..c6128e22 --- /dev/null +++ b/test/test_pathoc.py @@ -0,0 +1,27 @@ +import json +from libpathod import pathoc, test, version +import tutils + + + +class TestDaemon: + @classmethod + def setUpAll(self): + self.d = test.Daemon( + staticdir=tutils.test_data.path("data"), + anchors=[("/anchor/.*", "202")] + ) + + @classmethod + def tearDownAll(self): + self.d.shutdown() + + def setUp(self): + self.d.clear_log() + + def test_info(self): + c = pathoc.Pathoc("127.0.0.1", self.d.port) + c.connect() + _, _, _, _, content = c.request("get:/api/info") + assert tuple(json.loads(content)["version"]) == version.IVERSION + |