Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MongoEngine/mongoengine
/ ModelWithColor
Class
ModelWithColor
tests/fields/test_enum_field.py:153–154 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
151
152
153
class
ModelWithColor(Document):
154
color = EnumField(Color, default=Color.RED)
155
156
157
class
TestIntEnumField(MongoDBTestCase):
Callers
4
test_enum_with_int
Method · 0.85
test_create_int_enum_by_value
Method · 0.85
test_storage_enum_with_int
Method · 0.85
test_validate_model
Method · 0.85
Calls
1
EnumField
Class · 0.90
Tested by
4
test_enum_with_int
Method · 0.68
test_create_int_enum_by_value
Method · 0.68
test_storage_enum_with_int
Method · 0.68
test_validate_model
Method · 0.68