summaryrefslogtreecommitdiff
path: root/tests/asgi
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-12-31 10:01:31 +0100
committerGitHub <noreply@github.com>2023-12-31 10:01:31 +0100
commitd88ec42bd0a37340c8477a6f20bf26e58bd84735 (patch)
treeabd9422f7fb34a19579a74515ce84d9f472cd226 /tests/asgi
parent81ccf92f154c6d9eac3e30bac0aa67574d0ace15 (diff)
Used addCleanup() in tests where appropriate.
Diffstat (limited to 'tests/asgi')
-rw-r--r--tests/asgi/tests.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/asgi/tests.py b/tests/asgi/tests.py
index ced24c658e..3aeade4c05 100644
--- a/tests/asgi/tests.py
+++ b/tests/asgi/tests.py
@@ -32,9 +32,7 @@ class ASGITest(SimpleTestCase):
def setUp(self):
request_started.disconnect(close_old_connections)
-
- def tearDown(self):
- request_started.connect(close_old_connections)
+ self.addCleanup(request_started.connect, close_old_connections)
async def test_get_asgi_application(self):
"""