Added index for _types
This commit is contained in:
parent
eb3e6963fa
commit
54d276f6a7
3 changed files with 34 additions and 8 deletions
|
|
@ -239,7 +239,8 @@ class DocumentTest(unittest.TestCase):
|
|||
info = BlogPost.objects._collection.index_information()
|
||||
self.assertEqual(len(info), 0)
|
||||
|
||||
BlogPost.objects()
|
||||
# Indexes are lazy so use list() to perform query
|
||||
list(BlogPost.objects)
|
||||
info = BlogPost.objects._collection.index_information()
|
||||
self.assertTrue([('category', 1), ('addDate', -1)] in info.values())
|
||||
# Even though descending order was specified, single-key indexes use 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue