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...ytest-0/test_cli_single_deposit_slug_g0/tmpkglfnorz', 'length': 128, 'md5sum': '3b884ad0b9e55768fbb18c9a78d2b22e', ...}
patched_tmp_path = '/tmp/pytest-of-jenkins/pytest-0/test_cli_single_deposit_slug_g0'
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7f021abcec88>
cli_runner = <click.testing.CliRunner object at 0x7f021abce2b0>
def test_cli_single_deposit_slug_generation(
sample_archive, patched_tmp_path, requests_mock_datadir, cli_runner
):
"""Single deposit scenario without providing the slug, it should
not be generated.
"""
metadata_path = os.path.join(patched_tmp_path, "metadata.xml")
# fmt: off
result = cli_runner.invoke(
cli,
[
"upload",
"--url", "https://deposit.swh.test/1",
"--username", TEST_USER["username"],
"--password", TEST_USER["password"],
"--name", "test-project",
"--archive", sample_archive["path"],
"--author", "Jane Doe",
"--format", "json",
],
)
# fmt: on
> assert result.exit_code == 0, result.output
E AssertionError:
E assert 1 == 0
E +1
E -0
.tox/py3/lib/python3.7/site-packages/swh/deposit/tests/cli/test_client.py:562: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Feb 24 2022, 10:00 AM