diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-30 20:58:59 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-30 20:58:59 +1200 |
commit | fde65270afb3855057a86b40c5996c86f58fe97b (patch) | |
tree | dad83bd28cdfa36178560b7bcb7832d92c7a14c8 /libpathod/test.py | |
parent | e52a37ffa962f662cfcab8056c8af5b0ac9f416b (diff) | |
download | mitmproxy-fde65270afb3855057a86b40c5996c86f58fe97b.tar.gz mitmproxy-fde65270afb3855057a86b40c5996c86f58fe97b.tar.bz2 mitmproxy-fde65270afb3855057a86b40c5996c86f58fe97b.zip |
Testing examples and docs.
Diffstat (limited to 'libpathod/test.py')
-rw-r--r-- | libpathod/test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpathod/test.py b/libpathod/test.py index 53daa5bf..e431be18 100644 --- a/libpathod/test.py +++ b/libpathod/test.py @@ -12,6 +12,13 @@ class Daemon: self.port = self.q.get(True, 5) self.urlbase = "%s://%s:%s"%("https" if ssl else "http", self.IFACE, self.port) + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + self.shutdown() + return False + def p(self, spec): """ Return a URL that will render the response in spec. |