From 6cf0cf9e7d8076773ebfebb60d4e56faa9cd49f8 Mon Sep 17 00:00:00 2001 From: Matt Chisholm Date: Tue, 10 May 2011 12:31:31 +0200 Subject: [PATCH] slight reordering of test code for clarity --- tests/queryset.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/queryset.py b/tests/queryset.py index 03256d50..6d4f1619 100644 --- a/tests/queryset.py +++ b/tests/queryset.py @@ -1379,6 +1379,12 @@ class QuerySetTest(unittest.TestCase): points = Point.objects(location__near_sphere=[-122, 37.5]) self.assertEqual(points.count(), 2) + # Same behavior for _within_spherical_distance + points = Point.objects( + location__within_spherical_distance=[[-122, 37.5], 60/earth_radius] + ); + self.assertEqual(points.count(), 2) + # Finds both points, but orders the north point first because it's # closer to the reference point to the north. points = Point.objects(location__near_sphere=[-122, 38.5]) @@ -1393,12 +1399,6 @@ class QuerySetTest(unittest.TestCase): self.assertEqual(points[0].id, south_point.id) self.assertEqual(points[1].id, north_point.id) - # Same behavior for _within_spherical_distance - points = Point.objects( - location__within_spherical_distance=[[-122, 37.5], 60/earth_radius] - ); - self.assertEqual(points.count(), 2) - # Finds only one point because only the first point is within 60km of # the reference point to the south. points = Point.objects(