summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2012-10-05 16:08:16 -0700
committerJustin Bronn <jbronn@gmail.com>2012-10-05 16:08:16 -0700
commit84f9741664dadb3185c3d8822b720b340374066e (patch)
treeb0ff5ddb0f81d7a1737ec22220d5968e128a0f94
parent5a64bd38e61aeeaf4476a42aca06654f5ce6e429 (diff)
Fixed GMLv3 output test failure on PostGIS versions < 1.5.
-rw-r--r--django/contrib/gis/tests/geoapp/tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
index 1712eb5fe8..f94d716b34 100644
--- a/django/contrib/gis/tests/geoapp/tests.py
+++ b/django/contrib/gis/tests/geoapp/tests.py
@@ -529,8 +529,10 @@ class GeoQuerySetTest(TestCase):
for ptown in [ptown1, ptown2]:
self.assertTrue(gml_regex.match(ptown.gml))
- if postgis:
- self.assertIn('<gml:pos srsDimension="2">', City.objects.gml(version=3).get(name='Pueblo').gml)
+ # PostGIS < 1.5 doesn't include dimension im GMLv3 output.
+ if postgis and connection.ops.spatial_version >= (1, 5, 0):
+ self.assertIn('<gml:pos srsDimension="2">',
+ City.objects.gml(version=3).get(name='Pueblo').gml)
def test_kml(self):
"Testing KML output from the database using GeoQuerySet.kml()."