Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.api.views.test_snapshot::Tests / Python tests / test_api_snapshot_paginated
Failed

TEST RESULT

Run At
Aug 7 2020, 2:30 PM
Details
api_client = <rest_framework.test.APIClient object at 0x7fbe668c57b8> archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fbe6beb4cc0> @given(snapshot()) > def test_api_snapshot_paginated(api_client, archive_data, snapshot): .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_snapshot.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ api_client = <rest_framework.test.APIClient object at 0x7fbe668c57b8> archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fbe6beb4cc0> snapshot = 'a939fc6ac1a445973cd6eecc04e86afd7b46bbfa' @given(snapshot()) def test_api_snapshot_paginated(api_client, archive_data, snapshot): branches_offset = 0 branches_count = 2 snapshot_branches = [] for k, v in sorted(archive_data.snapshot_get(snapshot)["branches"].items()): snapshot_branches.append( {"name": k, "target_type": v["target_type"], "target": v["target"]} ) whole_snapshot = {"id": snapshot, "branches": {}, "next_branch": None} while branches_offset < len(snapshot_branches): branches_from = snapshot_branches[branches_offset]["name"] url = reverse( "api-1-snapshot", url_args={"snapshot_id": snapshot}, query_params={ "branches_from": branches_from, "branches_count": branches_count, }, ) rv = api_client.get(url) > assert rv.status_code == 200, rv.data E AssertionError: {'exception': 'AttributeError', 'reason': "'dict' object has no attribute 'to_dict'"} E assert 500 == 200 E +500 E -200 .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_snapshot.py:57: AssertionError