mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed GISFunctionsTests.test_asgeojson() crash on MariaDB 10.2+.
This commit is contained in:
		| @@ -85,6 +85,9 @@ class GISFunctionsTests(FuncTestMixin, TestCase): | |||||||
|         # SELECT ST_AsGeoJson("geoapp_city"."point", 5, 3) FROM "geoapp_city" |         # SELECT ST_AsGeoJson("geoapp_city"."point", 5, 3) FROM "geoapp_city" | ||||||
|         # WHERE "geoapp_city"."name" = 'Chicago'; |         # WHERE "geoapp_city"."name" = 'Chicago'; | ||||||
|         # Finally, we set every available keyword. |         # Finally, we set every available keyword. | ||||||
|  |         # MariaDB doesn't limit the number of decimals in bbox. | ||||||
|  |         if mysql and connection.mysql_is_mariadb: | ||||||
|  |             chicago_json['bbox'] = [-87.650175, 41.850385, -87.650175, 41.850385] | ||||||
|         self.assertJSONEqual( |         self.assertJSONEqual( | ||||||
|             City.objects.annotate( |             City.objects.annotate( | ||||||
|                 geojson=functions.AsGeoJSON('point', bbox=True, crs=True, precision=5) |                 geojson=functions.AsGeoJSON('point', bbox=True, crs=True, precision=5) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user