archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f87b0e89f28>
@given(snapshot())
> def test_lookup_snapshot_sizes(archive_data, snapshot):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:1038:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:1051: in test_lookup_snapshot_sizes
assert archive.lookup_snapshot_sizes(snapshot) == expected_sizes
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
snapshot_id = 'a939fc6ac1a445973cd6eecc04e86afd7b46bbfa'
branch_name_exclude_prefix = None
def lookup_snapshot_sizes(
snapshot_id: str, branch_name_exclude_prefix: Optional[str] = None
) -> Dict[str, int]:
"""Count the number of branches in the snapshot with the given id
Args:
snapshot_id (str): sha1 identifier of the snapshot
Returns:
dict: A dict whose keys are the target types of branches and
values their corresponding amount
"""
snapshot_id_bin = _to_sha1_bin(snapshot_id)
snapshot_sizes = dict.fromkeys(("alias", "release", "revision"), 0)
branch_counts = storage.snapshot_count_branches(
snapshot_id_bin,
> branch_name_exclude_prefix.encode() if branch_name_exclude_prefix else None,
)
E TypeError: snapshot_count_branches() takes 2 positional arguments but 3 were given
.tox/py3/lib/python3.7/site-packages/swh/web/common/archive.py:1042: TypeError
TEST RESULT
TEST RESULT
- Run At
- Mar 10 2021, 11:39 AM