sample_data = {'authority': [MetadataAuthority(type=<MetadataAuthorityType.DEPOSIT: 'deposit'>, url='http://hal.inria.example.com/',...45678901234567890', 'type': 'dir'}), 'id': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e\xed\xc3\x96\xbe'}], ...}
sample_data_model = {'content': [Content(sha1=b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89', sha1_git=b'\xd8\x1c\xc0q\x0e\xb...M\x804\xfa\xec\x9e\xed\xc3\x96\xbe')], 'origin': [Origin(url='file:///dev/null'), Origin(url='file:///dev/zero')], ...}
def test_sample_data(sample_data, sample_data_model):
assert set(sample_data.keys()) == set(
[
"content",
"content_metadata",
"skipped_content",
"person",
"directory",
"revision",
"release",
"snapshot",
"origin",
"origin_visit",
"fetcher",
"authority",
"origin_metadata",
]
)
for object_type, objs in sample_data.items():
for obj in objs:
> assert isinstance(obj, dict)
E AssertionError: assert False
E + where False = isinstance(MetadataFetcher(name='swh-deposit', version='0.0.1', metadata=<swh.model.collections.ImmutableDict object at 0x7fcb4053f3c8>), dict)
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_pytest_plugin.py:33: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 20 2020, 10:30 AM