@@ -415,7 +415,7 @@ def test_issue_364(self):
415
415
416
416
sql = "insert into issue364 (value_1, value_2) values (%s, %s)"
417
417
usql = u"insert into issue364 (value_1, value_2) values (%s, %s)"
418
- values = [b"\x00 \xff \x00 " , u"\xe4 \xf6 \xfc " ]
418
+ values = [pymysql . Binary ( b"\x00 \xff \x00 " ) , u"\xe4 \xf6 \xfc " ]
419
419
420
420
# test single insert and select
421
421
cur = conn .cursor ()
@@ -450,26 +450,26 @@ def test_issue_363(self):
450
450
if sys .version_info [0 :2 ] >= (3 ,2 ) and self .mysql_server_is (conn , (5 , 7 , 0 )):
451
451
with self .assertWarns (pymysql .err .Warning ) as cm :
452
452
cur .execute ("INSERT INTO issue363 (id, geom) VALUES ("
453
- "1998, GeomFromText ('LINESTRING(1.1 1.1,2.2 2.2)'))" )
453
+ "1998, ST_GeomFromText ('LINESTRING(1.1 1.1,2.2 2.2)'))" )
454
454
else :
455
455
cur .execute ("INSERT INTO issue363 (id, geom) VALUES ("
456
- "1998, GeomFromText ('LINESTRING(1.1 1.1,2.2 2.2)'))" )
456
+ "1998, ST_GeomFromText ('LINESTRING(1.1 1.1,2.2 2.2)'))" )
457
457
458
458
# select WKT
459
459
if sys .version_info [0 :2 ] >= (3 ,2 ) and self .mysql_server_is (conn , (5 , 7 , 0 )):
460
460
with self .assertWarns (pymysql .err .Warning ) as cm :
461
- cur .execute ("SELECT AsText (geom) FROM issue363" )
461
+ cur .execute ("SELECT ST_AsText (geom) FROM issue363" )
462
462
else :
463
- cur .execute ("SELECT AsText (geom) FROM issue363" )
463
+ cur .execute ("SELECT ST_AsText (geom) FROM issue363" )
464
464
row = cur .fetchone ()
465
465
self .assertEqual (row , ("LINESTRING(1.1 1.1,2.2 2.2)" , ))
466
466
467
467
# select WKB
468
468
if sys .version_info [0 :2 ] >= (3 ,2 ) and self .mysql_server_is (conn , (5 , 7 , 0 )):
469
469
with self .assertWarns (pymysql .err .Warning ) as cm :
470
- cur .execute ("SELECT AsBinary (geom) FROM issue363" )
470
+ cur .execute ("SELECT ST_AsBinary (geom) FROM issue363" )
471
471
else :
472
- cur .execute ("SELECT AsBinary (geom) FROM issue363" )
472
+ cur .execute ("SELECT ST_AsBinary (geom) FROM issue363" )
473
473
row = cur .fetchone ()
474
474
self .assertEqual (row ,
475
475
(b"\x01 \x02 \x00 \x00 \x00 \x02 \x00 \x00 \x00 "
0 commit comments