diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-21 23:03:45 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-21 23:03:45 +0200 |
commit | 2f670bac99943404952ebd5e76490e9643e50297 (patch) | |
tree | b6b25128692be754084aa35c95191400ef592b95 /examples/test_setup.py | |
parent | 2da4aaf1ede8310bb14c22e82248002b97b5f3e5 (diff) | |
download | mitmproxy-2f670bac99943404952ebd5e76490e9643e50297.tar.gz mitmproxy-2f670bac99943404952ebd5e76490e9643e50297.tar.bz2 mitmproxy-2f670bac99943404952ebd5e76490e9643e50297.zip |
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 <git@maximilianhils.com>
Date: Mon Sep 21 23:00:24 2015 +0200
disable parallelized tests
commit fc0c3f12ee9259162e83026851362925d93b69f2
Author: Maximilian Hils <git@maximilianhils.com>
Date: Mon Sep 21 22:49:19 2015 +0200
fix tests
commit baba3ca5ef49bdbd7aad14f1bf0626738fa3d21c
Author: Maximilian Hils <git@maximilianhils.com>
Date: Mon Sep 21 22:28:20 2015 +0200
fix tests, use py.test
Diffstat (limited to 'examples/test_setup.py')
-rw-r--r-- | examples/test_setup.py | 6 |
1 files changed, 3 insertions, 3 deletions
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"] |