archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f0e85b41588>
@given(content(), directory(), release(), revision(), snapshot())
> def test_lookup_known_objects(
archive_data, content, directory, release, revision, snapshot
):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_service.py:815:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_service.py:818: in test_lookup_known_objects
expected = archive_data.content_find(content)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.web.tests.conftest._ArchiveData object at 0x7f0e85b41588>
content = {'blake2s256': '10d45e33c688be4d01fe8177928a6d2c36ecdf9d6ab301dc9816ee17310162b4', 'data': '!function(n,e){"use strict...le.error("highlight.js not detected!")}(window,document);', 'encoding': 'us-ascii', 'hljs_language': 'javascript', ...}
def content_find(self, content: Dict[str, Any]) -> Dict[str, Any]:
cnt_ids_bytes = {
algo_hash: hash_to_bytes(content[algo_hash])
for algo_hash in ALGORITHMS
if content.get(algo_hash)
}
cnt = self.storage.content_find(cnt_ids_bytes)
> return converters.from_content(cnt[0].to_dict()) if cnt else cnt
E AttributeError: 'dict' object has no attribute 'to_dict'
.tox/py3/lib/python3.7/site-packages/swh/web/tests/conftest.py:177: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Aug 4 2020, 11:19 AM