fix queryset tests
This commit is contained in:
parent
f7a3acfaf4
commit
3f9ff7254f
@ -970,7 +970,10 @@ class QuerySetTest(unittest.TestCase):
|
|||||||
org = Organization.objects.get(id=o1.id)
|
org = Organization.objects.get(id=o1.id)
|
||||||
with query_counter() as q:
|
with query_counter() as q:
|
||||||
org.save(cascade=False)
|
org.save(cascade=False)
|
||||||
self.assertEqual(q, 0)
|
if mongodb_version >= (3, 0):
|
||||||
|
self.assertEqual(q, 1)
|
||||||
|
else:
|
||||||
|
self.assertEqual(q, 0)
|
||||||
|
|
||||||
# Saving a doc after you append a reference to it should result in
|
# Saving a doc after you append a reference to it should result in
|
||||||
# two db operations (a query for the reference and an update).
|
# two db operations (a query for the reference and an update).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user