Fixed two more tuple/int comparisons in gis tests

Refs 63ff417746.
This commit is contained in:
Claude Paroz 2014-10-11 17:14:24 +02:00
parent 63ff417746
commit bc46e4d4fa
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ class GeoModelTest(TestCase):
# If the GeometryField SRID is -1, then we shouldn't perform any # If the GeometryField SRID is -1, then we shouldn't perform any
# transformation if the SRID of the input geometry is different. # transformation if the SRID of the input geometry is different.
if spatialite and connection.ops.spatial_version < 3: if spatialite and connection.ops.spatial_version < (3, 0, 0):
# SpatiaLite < 3 does not support missing SRID values. # SpatiaLite < 3 does not support missing SRID values.
return return
m1 = MinusOneSRID(geom=Point(17, 23, srid=4326)) m1 = MinusOneSRID(geom=Point(17, 23, srid=4326))
@ -269,7 +269,7 @@ class GeoLookupTest(TestCase):
self.assertEqual('New Zealand', nz.name) self.assertEqual('New Zealand', nz.name)
# Spatialite 2.3 thinks that Lawrence is in Puerto Rico (a NULL geometry). # Spatialite 2.3 thinks that Lawrence is in Puerto Rico (a NULL geometry).
if not (spatialite and connection.ops.spatial_version < 3): if not (spatialite and connection.ops.spatial_version < (3, 0, 0)):
ks = State.objects.get(poly__contains=lawrence.point) ks = State.objects.get(poly__contains=lawrence.point)
self.assertEqual('Kansas', ks.name) self.assertEqual('Kansas', ks.name)