File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -182,19 +182,19 @@ def test_binary_prefix(self):
182
182
for binary_prefix in (True , False , None ):
183
183
kwargs = self .connect_kwargs .copy ()
184
184
# needs to be set to can guarantee CHARSET response for normal strings
185
- kwargs ["charset" ] = "utf8 "
185
+ kwargs ["charset" ] = "utf8mb4 "
186
186
if binary_prefix is not None :
187
187
kwargs ["binary_prefix" ] = binary_prefix
188
188
189
189
with closing (connection_factory (** kwargs )) as conn :
190
190
with closing (conn .cursor ()) as c :
191
191
c .execute ("SELECT CHARSET(%s)" , (MySQLdb .Binary (b"raw bytes" ),))
192
192
self .assertEqual (
193
- c .fetchall ()[0 ][0 ], "binary" if binary_prefix else "utf8 "
193
+ c .fetchall ()[0 ][0 ], "binary" if binary_prefix else "utf8mb4 "
194
194
)
195
195
# normal strings should not get prefix
196
196
c .execute ("SELECT CHARSET(%s)" , ("str" ,))
197
- self .assertEqual (c .fetchall ()[0 ][0 ], "utf8 " )
197
+ self .assertEqual (c .fetchall ()[0 ][0 ], "utf8mb4 " )
198
198
199
199
200
200
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments