コード例 #1
0
def test_parse_object_with_saving_state():
    obj = {
        "num_1": 1,
        "num_2": 2,
        "_id": ObjectId(),
        "internal": InternalDoc(),
    }
    doc = DocumentWithTurnedOnStateManagement._parse_obj_saving_state(obj)
    assert doc.get_saved_state() == obj
コード例 #2
0
def doc_default(state):
    return DocumentWithTurnedOnStateManagement._parse_obj_saving_state(state)