Changeset 7836 for django/branches/gis/django/contrib/gis/tests/distapp
- Timestamp:
- 07/04/08 15:16:22 (5 months ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/contrib/gis/tests/distapp/tests.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis
- Property svnmerge-integrated changed from /django/trunk:1-7767 to /django/trunk:1-7835
django/branches/gis/django/contrib/gis/tests/distapp/tests.py
r7666 r7836 89 89 90 90 # Creating the query set. 91 qs = AustraliaCity.objects. filter(point__dwithin=(self.au_pnt, dist)).order_by('name')91 qs = AustraliaCity.objects.order_by('name') 92 92 if type_error: 93 93 # A TypeError should be raised on PostGIS when trying to pass 94 94 # Distance objects into a DWithin query using a geodetic field. 95 self.assertRaises(TypeError, qs.count)95 self.assertRaises(TypeError, AustraliaCity.objects.filter, point__dwithin=(self.au_pnt, dist)) 96 96 else: 97 self.assertEqual(au_cities, self.get_names(qs ))98 97 self.assertEqual(au_cities, self.get_names(qs.filter(point__dwithin=(self.au_pnt, dist)))) 98 99 99 def test03a_distance_method(self): 100 100 "Testing the `distance` GeoQuerySet method on projected coordinate systems." … … 218 218 # Too many params (4 in this case) should raise a ValueError. 219 219 self.assertRaises(ValueError, 220 AustraliaCity.objects.filter (point__distance_lte=('POINT(5 23)', D(km=100), 'spheroid', '4')).count)220 AustraliaCity.objects.filter, point__distance_lte=('POINT(5 23)', D(km=100), 'spheroid', '4')) 221 221 222 222 # Not enough params should raise a ValueError. 223 223 self.assertRaises(ValueError, 224 AustraliaCity.objects.filter (point__distance_lte=('POINT(5 23)',)).count)224 AustraliaCity.objects.filter, point__distance_lte=('POINT(5 23)',)) 225 225 226 226 # Getting all cities w/in 550 miles of Hobart.
