aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r--test/test_proxy.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 172613aa..57ad606d 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -13,14 +13,10 @@ from netlib import http, tcp
from netlib.http import http1
-class TestServerConnection:
- def setUp(self):
- self.d = test.Daemon()
-
- def tearDown(self):
- self.d.shutdown()
+class TestServerConnection(object):
def test_simple(self):
+ self.d = test.Daemon()
sc = ServerConnection((self.d.IFACE, self.d.port))
sc.connect()
f = tutils.tflow()
@@ -35,14 +31,17 @@ class TestServerConnection:
assert self.d.last_log()
sc.finish()
+ self.d.shutdown()
def test_terminate_error(self):
+ self.d = test.Daemon()
sc = ServerConnection((self.d.IFACE, self.d.port))
sc.connect()
sc.connection = mock.Mock()
sc.connection.recv = mock.Mock(return_value=False)
sc.connection.flush = mock.Mock(side_effect=TcpDisconnect)
sc.finish()
+ self.d.shutdown()
def test_repr(self):
sc = tutils.tserver_conn()