From 254614e9f77e108d186ff3f7e89ec78012af65a1 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 2 Jun 2016 18:10:36 +1200 Subject: Since we have locks over the logs, use direct access rather than API requests to get to them --- test/pathod/test_app.py | 2 +- test/pathod/test_pathod.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'test/pathod') 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): -- cgit v1.2.3