diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-07 11:39:37 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-07 11:39:37 +1200 |
commit | 34ffe46fa0474a47bc737669ccd58fe036e3a033 (patch) | |
tree | 14cf0e950055c2a493320cf453a499467c902fed /test/test_test.py | |
parent | 14b2a69d2119d8b9d0260aa31190fc7869b45e05 (diff) | |
download | mitmproxy-34ffe46fa0474a47bc737669ccd58fe036e3a033.tar.gz mitmproxy-34ffe46fa0474a47bc737669ccd58fe036e3a033.tar.bz2 mitmproxy-34ffe46fa0474a47bc737669ccd58fe036e3a033.zip |
Add /api/info, returning general info on the running pathod daemon.
Diffstat (limited to 'test/test_test.py')
-rw-r--r-- | test/test_test.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/test_test.py b/test/test_test.py index 6e80dd77..c10cee4c 100644 --- a/test/test_test.py +++ b/test/test_test.py @@ -1,10 +1,10 @@ import time import libpry import requests -from libpathod import test +from libpathod import test, version -class uDaemon(libpry.AutoTree): +class uDaemonManual(libpry.AutoTree): def test_startstop(self): d = test.Daemon() rsp = requests.get("http://localhost:%s/p/202"%d.port) @@ -15,7 +15,19 @@ class uDaemon(libpry.AutoTree): assert not rsp.ok +class uDaemon(libpry.AutoTree): + def setUpAll(self): + self.d = test.Daemon() + + def tearDownAll(self): + self.d.shutdown() + + def test_info(self): + assert tuple(self.d.info()["version"]) == version.IVERSION + + tests = [ + uDaemonManual(), uDaemon() ] |