summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTom <tom@tomforb.es>2018-07-05 21:06:09 +0100
committerTim Graham <timograham@gmail.com>2018-07-06 09:05:55 -0400
commitc7ac2ee77309d2fa5a08960a81d65fde1a06834c (patch)
tree26c2b2873842ed02657ede3961c6201b7fec5e9a /tests
parentabec2ad18dd24df78364c1ffb4e8aca6990032db (diff)
[2.1.x] Refs #29451 -- Fixed test_isvalid_lookup on MySQL 8+.
Backport of f98e1c01eafa724cb87772ae03b3fd1158e9fd50 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/gis_tests/geoapp/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py
index cfc6829fff..6f07f3b7b6 100644
--- a/tests/gis_tests/geoapp/tests.py
+++ b/tests/gis_tests/geoapp/tests.py
@@ -300,10 +300,10 @@ 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 oracle or mysql:
+ if oracle or (mysql and connection.mysql_version < (8, 0, 0)):
# Kansas has adjacent vertices with distance 6.99244813842e-12
# which is smaller than the default Oracle tolerance.
- # It's invalid on MySQL too.
+ # It's invalid on MySQL < 8 also.
qs = qs.exclude(name='Kansas')
self.assertEqual(State.objects.filter(name='Kansas', poly__isvalid=False).count(), 1)
self.assertEqual(qs.filter(poly__isvalid=False).count(), 1)