aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/test_context.py2
-rw-r--r--examples/test_setup.py6
-rw-r--r--examples/test_setupall.py8
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/test_context.py b/examples/test_context.py
index 1f0a7f8b..7c0386c1 100644
--- a/examples/test_context.py
+++ b/examples/test_context.py
@@ -16,7 +16,7 @@ def test_simple():
# Check the returned data
assert r.status_code == 200
- assert len(r.body) == 100
+ assert len(r.content) == 100
# Check pathod's internal log
log = d.last_log()["request"]
diff --git a/examples/test_setup.py b/examples/test_setup.py
index c6e52d00..6085c98a 100644
--- a/examples/test_setup.py
+++ b/examples/test_setup.py
@@ -10,10 +10,10 @@ class Test:
each test.
"""
- def setUp(self):
+ def setup(self):
self.d = test.Daemon()
- def tearDown(self):
+ def teardown(self):
self.d.shutdown()
def test_simple(self):
@@ -24,7 +24,7 @@ class Test:
# Check the returned data
assert r.status_code == 200
- assert len(r.body) == 100
+ assert len(r.content) == 100
# Check pathod's internal log
log = self.d.last_log()["request"]
diff --git a/examples/test_setupall.py b/examples/test_setupall.py
index ddf4d905..f0ba5844 100644
--- a/examples/test_setupall.py
+++ b/examples/test_setupall.py
@@ -10,14 +10,14 @@ class Test:
for the test suite.
"""
@classmethod
- def setUpAll(cls):
+ def setup_class(cls):
cls.d = test.Daemon()
@classmethod
- def tearDownAll(cls):
+ def teardown_class(cls):
cls.d.shutdown()
- def setUp(self):
+ def setup(self):
# Clear the pathod logs between tests
self.d.clear_log()
@@ -29,7 +29,7 @@ class Test:
# Check the returned data
assert r.status_code == 200
- assert len(r.body) == 100
+ assert len(r.content) == 100
# Check pathod's internal log
log = self.d.last_log()["request"]