aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libpathod/test.py5
-rw-r--r--setup.py2
-rw-r--r--test/test_pathod.py2
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):
diff --git a/setup.py b/setup.py
index 0653ee70..624ef1b0 100644
--- a/setup.py
+++ b/setup.py
@@ -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()