From 5a9c5555f32028b752612e175fb17b6567b1a6a3 Mon Sep 17 00:00:00 2001 From: Alvaro del Castillo Date: Thu, 6 Sep 2012 09:21:24 +0200 Subject: [PATCH] Close DB connections --- tests/test_allura.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_allura.py b/tests/test_allura.py index a892982..acd10fa 100644 --- a/tests/test_allura.py +++ b/tests/test_allura.py @@ -121,6 +121,7 @@ def setUpDB(): c = AlluraTest.db.cursor() sql = "CREATE DATABASE "+ Config.db_database_out +" CHARACTER SET utf8 COLLATE utf8_unicode_ci" c.execute(sql) + AlluraTest.db.close() AlluraTest.db = MySQLdb.connect(user=Config.db_user_out, passwd=Config.db_password_out, db=Config.db_database_out) @staticmethod @@ -147,6 +148,7 @@ def closeBackend(): c = AlluraTest.db.cursor() sql = "DROP DATABASE " + Config.db_database_out c.execute(sql) + AlluraTest.db.close() if __name__ == '__main__': AlluraTest.setUpBackend()