From 2f670bac99943404952ebd5e76490e9643e50297 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 21 Sep 2015 23:03:45 +0200 Subject: fix tests, use pytest We currently test with unparallelized builds, because there are apparently some race conditions in the test suite, which I can't trigger locally but happen on travis. Squashed commit of the following: commit 7dceb6dd3a1bdbc39688258bc4dff6eee685a33b Author: Maximilian Hils Date: Mon Sep 21 23:00:24 2015 +0200 disable parallelized tests commit fc0c3f12ee9259162e83026851362925d93b69f2 Author: Maximilian Hils Date: Mon Sep 21 22:49:19 2015 +0200 fix tests commit baba3ca5ef49bdbd7aad14f1bf0626738fa3d21c Author: Maximilian Hils Date: Mon Sep 21 22:28:20 2015 +0200 fix tests, use py.test --- examples/test_setupall.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/test_setupall.py') 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"] -- cgit v1.2.3