diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index 60b65e309a31..1110466fcfd1 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -2186,6 +2186,8 @@ def test_allowed_database_copy_queries(self): finally: new_connection.validate_thread_sharing() new_connection._close() + if hasattr(new_connection, "close_pool"): + new_connection.close_pool() class DatabaseAliasTests(SimpleTestCase):