Skip to content

Commit 2e00119

Browse files
committed
Fixed GISFunctionsTests.test_asgeojson() crash on MariaDB 10.2+.
1 parent 9e38ed0 commit 2e00119

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/gis_tests/geoapp/test_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def test_asgeojson(self):
8585
# SELECT ST_AsGeoJson("geoapp_city"."point", 5, 3) FROM "geoapp_city"
8686
# WHERE "geoapp_city"."name" = 'Chicago';
8787
# Finally, we set every available keyword.
88+
# MariaDB doesn't limit the number of decimals in bbox.
89+
if mysql and connection.mysql_is_mariadb:
90+
chicago_json['bbox'] = [-87.650175, 41.850385, -87.650175, 41.850385]
8891
self.assertJSONEqual(
8992
City.objects.annotate(
9093
geojson=functions.AsGeoJSON('point', bbox=True, crs=True, precision=5)

0 commit comments

Comments
 (0)