corrected and enhanced geo_index test
This commit is contained in:
parent
48316ba60d
commit
e80322021a
@ -336,12 +336,11 @@ class GeoFieldTest(unittest.TestCase):
|
|||||||
Location.drop_collection()
|
Location.drop_collection()
|
||||||
Parent.drop_collection()
|
Parent.drop_collection()
|
||||||
|
|
||||||
list(Parent.objects)
|
Parent(name='Berlin').save()
|
||||||
|
info = Parent._get_collection().index_information()
|
||||||
collection = Parent._get_collection()
|
|
||||||
info = collection.index_information()
|
|
||||||
|
|
||||||
self.assertFalse('location_2d' in info)
|
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(Parent._geo_indices()), 0)
|
||||||
self.assertEqual(len(Location._geo_indices()), 1)
|
self.assertEqual(len(Location._geo_indices()), 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user