diff --git a/tests2/mysqltests.py b/tests2/mysqltests.py index 288a7a4a..3aea73d2 100755 --- a/tests2/mysqltests.py +++ b/tests2/mysqltests.py @@ -693,9 +693,9 @@ def test_emoticons(self): # # http://www.fileformat.info/info/unicode/char/1f31c/index.htm - v = "x \U0001F31C z" + v = u"x \U0001F31C z" - self.cursor.execute("create table t1(s varchar(100))") + self.cursor.execute("CREATE TABLE t1(s varchar(100)) DEFAULT CHARSET=utf8mb4") self.cursor.execute("insert into t1 values (?)", v) result = self.cursor.execute("select s from t1").fetchone()[0] diff --git a/tests3/mysqltests.py b/tests3/mysqltests.py index d1436329..1e612cde 100755 --- a/tests3/mysqltests.py +++ b/tests3/mysqltests.py @@ -721,7 +721,7 @@ def test_emoticons(self): v = "x \U0001F31C z" - self.cursor.execute("create table t1(s varchar(100))") + self.cursor.execute("CREATE TABLE t1(s varchar(100)) DEFAULT CHARSET=utf8mb4") self.cursor.execute("insert into t1 values (?)", v) result = self.cursor.execute("select s from t1").fetchone()[0]