sample_archive = {'data': b'PK\x03\x04\x14\x00\x00\x00\x00\x00|GXT\xcba\xb4c\x14\x00\x00\x00\x14\x00\x00\x00\x05\x00\x00\x00file1some c...s/pytest-0/test_cli_multisteps_deposit0/tmpr_qicku_', 'length': 128, 'md5sum': 'a56ae1d8d25f737fcc91b95a3d65e836', ...}
datadir = '/var/lib/jenkins/workspace/DDEP/tests-on-diff@3/.tox/py3/lib/python3.7/site-packages/swh/deposit/tests/cli/../data'
slug = '76616488-cfd8-443d-a1d0-7ac5b5544eff'
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7f021a596fd0>
cli_runner = <click.testing.CliRunner object at 0x7f021a596a20>
def test_cli_multisteps_deposit(
sample_archive, datadir, slug, requests_mock_datadir, cli_runner
):
""" First deposit a partial deposit (no metadata, only archive), then update the metadata part.
https://docs.softwareheritage.org/devel/swh-deposit/getting-started.html#multisteps-deposit
""" # noqa
api_url = "https://deposit.test.metadata/1"
deposit_id = 666
# Create a partial deposit with only 1 archive
# fmt: off
result = cli_runner.invoke(
cli,
[
"upload",
"--url", api_url,
"--username", TEST_USER["username"],
"--password", TEST_USER["password"],
"--archive", sample_archive["path"],
"--slug", slug,
"--format", "json",
"--partial",
],
)
# fmt: on
> assert result.exit_code == 0, f"unexpected output: {result.output}"
E AssertionError: unexpected output:
E assert 1 == 0
E +1
E -0
.tox/py3/lib/python3.7/site-packages/swh/deposit/tests/cli/test_client.py:602: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Feb 24 2022, 10:00 AM