Updates must have an operation

Closes #387
This commit is contained in:
Ross Lawley
2012-02-29 11:04:09 +00:00
parent 2afa2171f9
commit 44b9fb66e1
3 changed files with 11 additions and 1 deletions

View File

@@ -1432,6 +1432,12 @@ class DocumentTest(unittest.TestCase):
self.assertRaises(OperationError, update_no_value_raises)
def update_no_op_raises():
person = self.Person.objects.first()
person.update(name="Dan")
self.assertRaises(InvalidQueryError, update_no_op_raises)
def test_embedded_update(self):
"""
Test update on `EmbeddedDocumentField` fields