Skip to content

Commit 65d4da5

Browse files
committed
test harness can delete connections
1 parent 1f10737 commit 65d4da5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

qiita_core/util.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ def setUp(self):
8080
@reset_test_database
8181
def tearDown(self):
8282
super(DecoratedClass, self).tearDown()
83-
del self.conn_handler
83+
if self.conn_handler._user_conn is not None:
84+
self.conn_handler._user_conn.close()
85+
86+
if self.conn_handler._admin_conn is not None:
87+
self.conn_handler._admin_conn.close()
88+
89+
if self.conn_handler._admin_nodb_conn is not None:
90+
self.conn_handler._admin_nodb_conn.close()
8491

8592
return DecoratedClass
8693
return class_modifier

0 commit comments

Comments
 (0)