Fix for ListField that isnt detecting properly that item 0 is changed
This commit is contained in:
@@ -113,7 +113,7 @@ class TestDictField(MongoDBTestCase):
|
||||
post.info.setdefault("authors", [])
|
||||
post.save()
|
||||
post.reload()
|
||||
assert [] == post.info["authors"]
|
||||
assert post.info["authors"] == []
|
||||
|
||||
def test_dictfield_dump_document(self):
|
||||
"""Ensure a DictField can handle another document's dump."""
|
||||
|
||||
@@ -1084,7 +1084,7 @@ class TestField(MongoDBTestCase):
|
||||
|
||||
e = Simple().save()
|
||||
e.mapping = []
|
||||
assert [] == e._changed_fields
|
||||
assert e._changed_fields == []
|
||||
|
||||
class Simple(Document):
|
||||
mapping = DictField()
|
||||
@@ -1093,7 +1093,7 @@ class TestField(MongoDBTestCase):
|
||||
|
||||
e = Simple().save()
|
||||
e.mapping = {}
|
||||
assert [] == e._changed_fields
|
||||
assert e._changed_fields == []
|
||||
|
||||
def test_slice_marks_field_as_changed(self):
|
||||
class Simple(Document):
|
||||
|
||||
@@ -381,7 +381,7 @@ class TestGeoField(MongoDBTestCase):
|
||||
|
||||
meta = {"indexes": [[("location", "2dsphere"), ("datetime", 1)]]}
|
||||
|
||||
assert [] == Log._geo_indices()
|
||||
assert Log._geo_indices() == []
|
||||
|
||||
Log.drop_collection()
|
||||
Log.ensure_indexes()
|
||||
@@ -401,7 +401,7 @@ class TestGeoField(MongoDBTestCase):
|
||||
"indexes": [{"fields": [("location", "2dsphere"), ("datetime", 1)]}]
|
||||
}
|
||||
|
||||
assert [] == Log._geo_indices()
|
||||
assert Log._geo_indices() == []
|
||||
|
||||
Log.drop_collection()
|
||||
Log.ensure_indexes()
|
||||
|
||||
Reference in New Issue
Block a user