Skip to content

Commit

Permalink
Close DB connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvaro del Castillo committed Sep 6, 2012
1 parent 507d664 commit 5a9c555
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_allura.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 5a9c555

Please sign in to comment.