Commit 4857818a authored by Grégory Wisniewski's avatar Grégory Wisniewski

Close sql connection after each test.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@611 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 340fd03a
......@@ -72,7 +72,8 @@ server: 127.0.0.1:10020
cursor.execute('CREATE DATABASE %s' % (NEO_SQL_DATABASE, ))
cursor.execute('GRANT ALL ON %s.* TO "%s"@"localhost" IDENTIFIED BY ""' %
(NEO_SQL_DATABASE, NEO_SQL_USER))
cursor.close()
sql_connection.close()
tmp_id, self.tmp_path = mkstemp()
tmp_file = os.fdopen(tmp_id, "w+b")
tmp_file.write(config_file_text)
......
......@@ -80,6 +80,7 @@ server: 127.0.0.1:10020
cursor.execute('GRANT ALL ON %s.* TO "%s"@"localhost" IDENTIFIED BY ""' %
(NEO_SQL_DATABASE, NEO_SQL_USER))
cursor.close()
sql_connection.close()
# config file
tmp_id, self.tmp_path = mkstemp()
tmp_file = os.fdopen(tmp_id, "w+b")
......
......@@ -44,6 +44,8 @@ class StorageMySQSLdbTests(unittest.TestCase):
cursor.execute('CREATE DATABASE %s' % (NEO_SQL_DATABASE, ))
cursor.execute('GRANT ALL ON %s.* TO "%s"@"localhost" IDENTIFIED BY ""' %
(NEO_SQL_DATABASE, NEO_SQL_USER))
cursor.close()
sql_connection.close()
# db manager
self.db = MySQLDatabaseManager(
database=NEO_SQL_DATABASE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment