summaryrefslogtreecommitdiff
path: root/tests/httpwrappers
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/httpwrappers
parent81ccf92f154c6d9eac3e30bac0aa67574d0ace15 (diff)
Used addCleanup() in tests where appropriate.
Diffstat (limited to 'tests/httpwrappers')
-rw-r--r--tests/httpwrappers/tests.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index 0a41ea5ec6..cce8402d3f 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -762,9 +762,7 @@ class FileCloseTests(SimpleTestCase):
# Disable the request_finished signal during this test
# to avoid interfering with the database connection.
request_finished.disconnect(close_old_connections)
-
- def tearDown(self):
- request_finished.connect(close_old_connections)
+ self.addCleanup(request_finished.connect, close_old_connections)
def test_response(self):
filename = os.path.join(os.path.dirname(__file__), "abc.txt")