Django

Code

Show
Ignore:
Timestamp:
07/04/08 15:16:22 (5 months ago)
Author:
jbronn
Message:

gis: Merged revisions 7772-7808,7811-7814,7816-7823,7826-7829,7831-7833,7835 via svnmerge from trunk. Modified GeoWhereNode accordingly for changes in r7835.

Files:

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  
    8989                 
    9090            # 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') 
    9292            if type_error: 
    9393                # A TypeError should be raised on PostGIS when trying to pass 
    9494                # 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)
    9696            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                                  
    9999    def test03a_distance_method(self): 
    100100        "Testing the `distance` GeoQuerySet method on projected coordinate systems." 
     
    218218            # Too many params (4 in this case) should raise a ValueError. 
    219219            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')
    221221 
    222222        # Not enough params should raise a ValueError. 
    223223        self.assertRaises(ValueError, 
    224                           AustraliaCity.objects.filter(point__distance_lte=('POINT(5 23)',)).count
     224                          AustraliaCity.objects.filter, point__distance_lte=('POINT(5 23)',)
    225225 
    226226        # Getting all cities w/in 550 miles of Hobart.