Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MongoEngine/mongoengine
/ Doc
Class
Doc
tests/fields/test_fields.py:245–246 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
243
244
# Issue #1733
245
class
Doc(Document):
246
x = ListField(IntField(), default=
lambda
: [42])
247
248
doc = Doc(x=[1]).save()
249
doc.x = []
Callers
9
test_default_value_is_not_used_when_changing_value_to_empty_list_for_strict_doc
Method · 0.70
test_default_value_is_not_used_when_changing_value_to_empty_list_for_dyn_doc
Method · 0.70
test_dynamic_fields_class
Method · 0.70
test_dynamic_fields_embedded_class
Method · 0.70
test_dynamicfield_dump_document
Method · 0.70
test_sparse_field
Method · 0.70
test_undefined_field_exception
Method · 0.70
test_undefined_field_exception_with_strict
Method · 0.70
test_undefined_field_works_no_confusion_with_db_field
Method · 0.70
Calls
5
ListField
Class · 0.90
IntField
Class · 0.90
GenericReferenceField
Class · 0.90
DynamicField
Class · 0.90
StringField
Class · 0.90
Tested by
9
test_default_value_is_not_used_when_changing_value_to_empty_list_for_strict_doc
Method · 0.56
test_default_value_is_not_used_when_changing_value_to_empty_list_for_dyn_doc
Method · 0.56
test_dynamic_fields_class
Method · 0.56
test_dynamic_fields_embedded_class
Method · 0.56
test_dynamicfield_dump_document
Method · 0.56
test_sparse_field
Method · 0.56
test_undefined_field_exception
Method · 0.56
test_undefined_field_exception_with_strict
Method · 0.56
test_undefined_field_works_no_confusion_with_db_field
Method · 0.56