diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 14:59:54 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 14:59:54 +1200 |
commit | fd946f0c04c2471ab9e579087af3f4cb645be41a (patch) | |
tree | 65c9b2f20d0d5a4ba9569435d6b5f0cad053f10e /test/test_app.py | |
parent | 6d4500c67943d03cf0910256ef9dab46789f366f (diff) | |
download | mitmproxy-fd946f0c04c2471ab9e579087af3f4cb645be41a.tar.gz mitmproxy-fd946f0c04c2471ab9e579087af3f4cb645be41a.tar.bz2 mitmproxy-fd946f0c04c2471ab9e579087af3f4cb645be41a.zip |
Basic logging.
Diffstat (limited to 'test/test_app.py')
-rw-r--r-- | test/test_app.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_app.py b/test/test_app.py index e0060e82..721b36d7 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -14,6 +14,18 @@ class uApplication(libpry.AutoTree): a.remove_anchor("/oink", "400") assert a.get_anchors() == [("/foo", "200")] + def test_logs(self): + a = app.PathodApp(staticdir=None) + a.LOGBUF = 3 + a.add_log({}) + assert a.log[0]["id"] == 0 + a.add_log({}) + a.add_log({}) + assert a.log[0]["id"] == 2 + a.add_log({}) + assert len(a.log) == 3 + assert a.log[0]["id"] == 3 + assert a.log[-1]["id"] == 1 class uPages(libpry.AutoTree): def dummy_page(self, path): |