From e80322021a5d41a1ee1ac889d11237a56c9f6f0e Mon Sep 17 00:00:00 2001 From: mrigal Date: Fri, 10 Apr 2015 23:20:22 +0200 Subject: [PATCH] corrected and enhanced geo_index test --- tests/fields/geo.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/fields/geo.py b/tests/fields/geo.py index 8193d87e..a0d2237a 100644 --- a/tests/fields/geo.py +++ b/tests/fields/geo.py @@ -336,12 +336,11 @@ class GeoFieldTest(unittest.TestCase): Location.drop_collection() Parent.drop_collection() - list(Parent.objects) - - collection = Parent._get_collection() - info = collection.index_information() - + Parent(name='Berlin').save() + info = Parent._get_collection().index_information() self.assertFalse('location_2d' in info) + info = Location._get_collection().index_information() + self.assertTrue('location_2d' in info) self.assertEqual(len(Parent._geo_indices()), 0) self.assertEqual(len(Location._geo_indices()), 1)