Added test and fix for delete with write_concern w:0

This commit is contained in:
Matthieu Rigal
2015-06-21 03:40:45 +02:00
parent 5fa5284b58
commit bcc4d4e8c6
3 changed files with 8 additions and 1 deletions

View File

@@ -1634,6 +1634,11 @@ class QuerySetTest(unittest.TestCase):
self.Person.objects()[:1].delete()
self.assertEqual(1, BlogPost.objects.count())
def test_limit_with_write_concern_0(self):
p1 = self.Person(name="User Z", age=20).save()
p1.delete(w=0)
def test_reference_field_find(self):
"""Ensure cascading deletion of referring documents from the database.
"""