Skip to content

Commit

Permalink
5.7.0 does not like removing NO_AUTO_CREATE_USER so lets keep that th…
Browse files Browse the repository at this point in the history
…ere as it is not relvant to test_escape_string
  • Loading branch information
grooverdan committed Aug 26, 2015
1 parent 2d371cc commit 96f24ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymysql/tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def test_escape_string(self):
cur = con.cursor()

self.assertEqual(con.escape("foo'bar"), "'foo\\'bar'")
cur.execute("SET sql_mode='NO_BACKSLASH_ESCAPES'")
# added NO_AUTO_CREATE_USER as not including it in 5.7 generates warnings
cur.execute("SET sql_mode='NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER'")
self.assertEqual(con.escape("foo'bar"), "'foo''bar'")

def test_escape_builtin_encoders(self):
Expand Down

0 comments on commit 96f24ef

Please sign in to comment.