self = <swh.indexer.tests.test_metadata.TestMetadata object at 0x7fe69ff03eb8>
def test_compute_metadata_cff_empty(self):
"""
test yaml translation for empty yaml file
"""
# given
content = """
""".encode(
"utf-8"
)
expected = None
> result = self.cff_mapping.translate(content)
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:193:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/cff.py:33: in translate
content_dict_checked = self.value_type_check(content_dict)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.indexer.metadata_dictionary.cff.CffMapping object at 0x7fe6847d3ef0>
content_dict = None
def value_type_check(self, content_dict):
type_checked_content_dict = {}
> for field in content_dict:
E TypeError: 'NoneType' object is not iterable
.tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/cff.py:45: TypeError
TEST RESULT
TEST RESULT
- Run At
- Jun 24 2022, 8:06 PM