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

Method test_storage

tests/fields/test_long_field.py:10–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

8
9class TestLongField(MongoDBTestCase):
10 def test_storage(self):
11 class Person(Document):
12 value = LongField()
13
14 Person.drop_collection()
15 person = Person(value=5000)
16 person.save()
17 assert get_as_pymongo(person) == {"_id": person.id, "value": 5000}
18
19 def test_construction_does_not_fail_with_invalid_value(self):
20 class Person(Document):

Callers

nothing calls this directly

Calls 4

get_as_pymongoFunction · 0.90
drop_collectionMethod · 0.80
PersonClass · 0.70
saveMethod · 0.45

Tested by

no test coverage detected