diff options
-rw-r--r-- | libpathod/test.py | 5 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | test/test_pathod.py | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/libpathod/test.py b/libpathod/test.py index 5ff7180c..2456e211 100644 --- a/libpathod/test.py +++ b/libpathod/test.py @@ -34,12 +34,11 @@ class Daemon: def last_log(self): """ - Returns the last logged request. Raises AssertionError if no - requests have been logged. + Returns the last logged request, or None. """ l = self.log() if not l: - raise AssertionError("No requests logged") + return None return l[-1] def log(self): @@ -89,5 +89,5 @@ setup( "Topic :: Software Development :: Testing :: Traffic Generation", "Topic :: Internet :: WWW/HTTP", ], - install_requires=['netlib>=0.2.2', "requests>=1.0.4", "flask"], + install_requires=['netlib>=0.2.2', "requests>=1.1.0", "flask"], ) diff --git a/test/test_pathod.py b/test/test_pathod.py index 665ef843..7f3edb63 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -96,7 +96,7 @@ class CommonTests(tutils.DaemonTests): def test_logs(self): assert self.d.clear_log() - tutils.raises("no requests logged", self.d.last_log) + assert not self.d.last_log() rsp = self.get("202:da") assert len(self.d.log()) == 1 assert self.d.clear_log() |