Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_revision_get_no_parents
Failed

TEST RESULT

Run At
Jul 9 2020, 11:41 AM
Details
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7f87501ebf28> swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f871479cf98> def test_revision_get_no_parents(self, swh_storage): > swh_storage.revision_add([data.revision3]) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:1122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/validate.py:104: in revision_add [dict_converter(Revision, r) for r in revisions] .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:433: in revision_add revobject = revision_to_db(revision) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ revision = Revision(message=b'a simple revision with no parents this time', author=Person(fullname=b'Roberto Dicosmo <roberto@exa...b', synthetic=True, metadata=None, parents=(), id=b',\xbd{\xb2,e;\xbb#\xa2\x96W\x85*P\xa0\x1bY\x1dF', extra_headers=()) def revision_to_db(revision: Revision) -> Dict[str, Any]: # we use a deepcopy of the dict because we do not want to recurse the # Model->dict conversion (to keep Timestamp & al. entities), BUT we do not # want to modify original metadata (embedded in the Model entity), so we # non-recursively convert it as a dict but make a deep copy. db_revision = deepcopy(attr.asdict(revision, recurse=False)) metadata = revision.metadata extra_headers = revision.extra_headers if not extra_headers and metadata and "extra_headers" in metadata: extra_headers = db_revision["metadata"].pop("extra_headers") db_revision["metadata"] = json.dumps( > dict(db_revision["metadata"] if db_revision["metadata"] is not None else None) ) E TypeError: 'NoneType' object is not iterable .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/converters.py:39: TypeError