diff options
Diffstat (limited to 'tests/servers')
| -rw-r--r-- | tests/servers/tests.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py index 5917e30d24..7f75b85d6c 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -209,8 +209,7 @@ class LiveServerPort(LiveServerBase): "Acquired duplicate server addresses for server threads: %s" % self.live_server_url ) finally: - if hasattr(TestCase, 'server_thread'): - TestCase.server_thread.terminate() + TestCase.tearDownClass() def test_specified_port_bind(self): """LiveServerTestCase.port customizes the server's port.""" @@ -227,8 +226,7 @@ class LiveServerPort(LiveServerBase): 'Did not use specified port for LiveServerTestCase thread: %s' % TestCase.port ) finally: - if hasattr(TestCase, 'server_thread'): - TestCase.server_thread.terminate() + TestCase.tearDownClass() class LiverServerThreadedTests(LiveServerBase): |
