Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MongoEngine/mongoengine
/ MyDoc
Class
MyDoc
tests/fields/test_object_id_field.py:10–11 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
8
class
TestObjectIdField(MongoDBTestCase):
9
def
test_storage(self):
10
class
MyDoc(Document):
11
oid = ObjectIdField()
12
13
doc = MyDoc(oid=ObjectId())
14
doc.save()
Callers
3
test_storage
Method · 0.70
test_constructor_converts_str_to_ObjectId
Method · 0.70
test_validation_works
Method · 0.70
Calls
1
ObjectIdField
Class · 0.90
Tested by
3
test_storage
Method · 0.56
test_constructor_converts_str_to_ObjectId
Method · 0.56
test_validation_works
Method · 0.56