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
def doc_default(state): return DocumentWithTurnedOnStateManagement._parse_obj_saving_state(state)