Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_model.py
- This file was added.
# Copyright (C) 2019 The Software Heritage developers | |||||
# See the AUTHORS file at the top-level directory of this distribution | |||||
# License: GNU General Public License version 3, or any later version | |||||
# See top-level LICENSE file for more information | |||||
from hypothesis import given | |||||
from swh.model.hypothesis_strategies import objects | |||||
@given(objects()) | |||||
def test_todict_inverse_fromdict(objtype_and_obj): | |||||
(obj_type, obj) = objtype_and_obj | |||||
assert obj == type(obj).from_dict(obj.to_dict()) |