modify bulk_insert test for pymongo3
This commit is contained in:
parent
765038274c
commit
2adb640821
@ -846,10 +846,10 @@ class QuerySetTest(unittest.TestCase):
|
|||||||
|
|
||||||
Blog.objects.insert(blogs, load_bulk=False)
|
Blog.objects.insert(blogs, load_bulk=False)
|
||||||
if mongodb_version < (2, 6):
|
if mongodb_version < (2, 6):
|
||||||
self.assertEqual(q, 1)
|
self.assertEqual(q, 99)
|
||||||
else:
|
else:
|
||||||
# profiling logs each doc now in the bulk op
|
# profiling logs each doc now in the bulk op
|
||||||
self.assertEqual(q, 99)
|
self.assertEqual(q, 1)
|
||||||
|
|
||||||
Blog.drop_collection()
|
Blog.drop_collection()
|
||||||
Blog.ensure_indexes()
|
Blog.ensure_indexes()
|
||||||
@ -859,7 +859,7 @@ class QuerySetTest(unittest.TestCase):
|
|||||||
|
|
||||||
Blog.objects.insert(blogs)
|
Blog.objects.insert(blogs)
|
||||||
if mongodb_version < (2, 6):
|
if mongodb_version < (2, 6):
|
||||||
self.assertEqual(q, 2) # 1 for insert, and 1 for in bulk fetch
|
self.assertEqual(q, 101) # 100 for insert, and 1 for in bulk fetch
|
||||||
else:
|
else:
|
||||||
# 99 for insert, and 1 for in bulk fetch
|
# 99 for insert, and 1 for in bulk fetch
|
||||||
self.assertEqual(q, 100)
|
self.assertEqual(q, 100)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user