Changeset 7840 for django/branches/gis/django/contrib/gis/tests/geoapp
- Timestamp:
- 07/05/08 11:59:51 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis/django/contrib/gis/tests/geoapp/models.py
r6886 r7840 28 28 objects = models.GeoManager() 29 29 def __unicode__(self): return self.name 30 31 class MinusOneSRID(models.Model): 32 geom = models.PointField(srid=-1) # Minus one SRID. 33 objects = models.GeoManager() django/branches/gis/django/contrib/gis/tests/geoapp/tests.py
r7836 r7840 1 1 import os, unittest 2 from models import Country, City, State, Feature 2 from models import Country, City, State, Feature, MinusOneSRID 3 3 from django.contrib.gis import gdal 4 4 from django.contrib.gis.db.backend import SpatialBackend … … 302 302 self.assertAlmostEqual(wgs_pnt.x, sa.point.x, 6) 303 303 self.assertAlmostEqual(wgs_pnt.y, sa.point.y, 6) 304 305 # If the GeometryField SRID is -1, then we shouldn't perform any 306 # transformation if the SRID of the input geometry is different. 307 m1 = MinusOneSRID(geom=Point(17, 23, srid=4326)) 308 m1.save() 309 self.assertEqual(-1, m1.geom.srid) 304 310 305 311 # Oracle does not support NULL geometries in its spatial index for
