MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / test_storage

Method test_storage

tests/fields/test_enum_field.py:37–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35
36class TestStringEnumField(MongoDBTestCase):
37 def test_storage(self):
38 model = ModelWithEnum(status=Status.NEW).save()
39 assert get_as_pymongo(model) == {"_id": model.id, "status": "new"}
40
41 def test_set_enum(self):
42 ModelWithEnum.drop_collection()

Callers

nothing calls this directly

Calls 3

get_as_pymongoFunction · 0.90
ModelWithEnumClass · 0.85
saveMethod · 0.45

Tested by

no test coverage detected