Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed GMLv3 output test failure on PostGIS versions < 1.5.

  • Loading branch information...
commit 84f9741664dadb3185c3d8822b720b340374066e 1 parent 5a64bd3
Justin Bronn authored October 05, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  django/contrib/gis/tests/geoapp/tests.py
6  django/contrib/gis/tests/geoapp/tests.py
@@ -529,8 +529,10 @@ def test_gml(self):
529 529
         for ptown in [ptown1, ptown2]:
530 530
             self.assertTrue(gml_regex.match(ptown.gml))
531 531
 
532  
-        if postgis:
533  
-            self.assertIn('<gml:pos srsDimension="2">', City.objects.gml(version=3).get(name='Pueblo').gml)
  532
+        # PostGIS < 1.5 doesn't include dimension im GMLv3 output.
  533
+        if postgis and connection.ops.spatial_version >= (1, 5, 0):
  534
+            self.assertIn('<gml:pos srsDimension="2">',
  535
+                          City.objects.gml(version=3).get(name='Pueblo').gml)
534 536
 
535 537
     def test_kml(self):
536 538
         "Testing KML output from the database using GeoQuerySet.kml()."

0 notes on commit 84f9741

Please sign in to comment.
Something went wrong with that request. Please try again.