Updated test to use new create_index method

This commit is contained in:
Matthieu Rigal 2015-06-02 00:14:18 +02:00
parent f35d0b2b37
commit a0257ed7e7

View File

@ -324,7 +324,7 @@ class IndexesTest(unittest.TestCase):
location = DictField() location = DictField()
name = StringField() name = StringField()
Place.ensure_index({'fields': (')location.point', 'name')}, bucketSize=10) Place.create_index({'fields': (')location.point', 'name')}, bucketSize=10)
info = Place._get_collection().index_information() info = Place._get_collection().index_information()
info = [value['key'] for key, value in info.iteritems()] info = [value['key'] for key, value in info.iteritems()]
self.assertTrue([('location.point', 'geoHaystack'), ('name', 1)] in info) self.assertTrue([('location.point', 'geoHaystack'), ('name', 1)] in info)