1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #33718 -- Dropped support for MySQL 5.7.

This commit is contained in:
Mariusz Felisiak
2022-07-08 13:30:12 +02:00
committed by GitHub
parent ccbf714ebe
commit eb3699ea77
16 changed files with 42 additions and 126 deletions

View File

@@ -345,12 +345,9 @@ class GeoLookupTest(TestCase):
invalid_geom = fromstr("POLYGON((0 0, 0 1, 1 1, 1 0, 1 1, 1 0, 0 0))")
State.objects.create(name="invalid", poly=invalid_geom)
qs = State.objects.all()
if connection.ops.oracle or (
connection.ops.mysql and connection.mysql_version < (8, 0, 0)
):
if connection.ops.oracle:
# Kansas has adjacent vertices with distance 6.99244813842e-12
# which is smaller than the default Oracle tolerance.
# It's invalid on MySQL < 8 also.
qs = qs.exclude(name="Kansas")
self.assertEqual(
State.objects.filter(name="Kansas", poly__isvalid=False).count(), 1