diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 18:10:36 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 18:10:36 +1200 |
commit | 254614e9f77e108d186ff3f7e89ec78012af65a1 (patch) | |
tree | 878cad506234f96de482e65d58a85e28afac6da2 /test/pathod | |
parent | 40156ce123962a6d0e431761833a506ec5aeebb9 (diff) | |
download | mitmproxy-254614e9f77e108d186ff3f7e89ec78012af65a1.tar.gz mitmproxy-254614e9f77e108d186ff3f7e89ec78012af65a1.tar.bz2 mitmproxy-254614e9f77e108d186ff3f7e89ec78012af65a1.zip |
Since we have locks over the logs, use direct access rather than API requests to get to them
Diffstat (limited to 'test/pathod')
-rw-r--r-- | test/pathod/test_app.py | 2 | ||||
-rw-r--r-- | test/pathod/test_pathod.py | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/test/pathod/test_app.py b/test/pathod/test_app.py index ac89c44c..7f691485 100644 --- a/test/pathod/test_app.py +++ b/test/pathod/test_app.py @@ -27,7 +27,7 @@ class TestApp(tutils.DaemonTests): def test_log(self): assert self.getpath("/log").status_code == 200 assert self.get("200:da").status_code == 200 - id = self.d.log()[0]["id"] + id = self.d.expect_log(1)[0]["id"] assert self.getpath("/log").status_code == 200 assert self.getpath("/log/%s" % id).status_code == 200 assert self.getpath("/log/9999999").status_code == 404 diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py index 5773a3c9..9916984e 100644 --- a/test/pathod/test_pathod.py +++ b/test/pathod/test_pathod.py @@ -142,11 +142,10 @@ class CommonTests(tutils.DaemonTests): assert tuple(self.d.info()["version"]) == version.IVERSION def test_logs(self): - assert self.d.clear_log() - assert not self.d.last_log() + self.d.clear_log() assert self.get("202:da") - assert len(self.d.log()) == 1 - assert self.d.clear_log() + assert self.d.expect_log(1) + self.d.clear_log() assert len(self.d.log()) == 0 def test_disconnect(self): |