Skip to content

Commit

Permalink
Merge pull request #30 from eleme/fix_ci
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
lxyu committed Mar 24, 2015
2 parents 6722eb4 + 246baf6 commit ae18773
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ def mysql_dsn(conf):
"passwd": parsed.password
}
conn = pymysql.connect(**db_settings)

cursor = conn.cursor()
sql = """
DROP DATABASE IF EXISTS meepo_test;
CREATE DATABASE meepo_test;
DROP TABLE IF EXISTS meepo_test.test;
CREATE TABLE meepo_test.test (
id INT NOT NULL AUTO_INCREMENT,
data VARCHAR (256) NOT NULL,
PRIMARY KEY (id)
);
RESET MASTER;
"""
cursor.execute(sql)

conn.begin()
cursor.execute("DROP DATABASE IF EXISTS meepo_test")
cursor.execute("CREATE DATABASE meepo_test")
cursor.execute("DROP TABLE IF EXISTS meepo_test.test")
cursor.execute('''CREATE TABLE meepo_test.test (
id INT NOT NULL AUTO_INCREMENT,
data VARCHAR (256) NOT NULL,
PRIMARY KEY (id)
)''')
cursor.execute("RESET MASTER")
conn.commit()

logger.debug("executed")

# release conn
Expand Down

0 comments on commit ae18773

Please sign in to comment.