Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/cli/test_client.py
Show First 20 Lines • Show All 591 Lines • ▼ Show 20 Lines | [ | ||||
"logging", | "logging", | ||||
ast.literal_eval, | ast.literal_eval, | ||||
), # not enough though, the caplog fixture is needed | ), # not enough though, the caplog fixture is needed | ||||
], | ], | ||||
) | ) | ||||
def test_cli_deposit_status_json( | def test_cli_deposit_status_json( | ||||
output_format, callable_fn, datadir, slug, requests_mock_datadir, caplog | output_format, callable_fn, datadir, slug, requests_mock_datadir, caplog | ||||
): | ): | ||||
"""Check deposit status cli with all possible output formats | """Check deposit status cli with all possible output formats (json, yaml, logging). | ||||
""" | """ | ||||
api_url_basename = "deposit.test.status" | api_url_basename = "deposit.test.status" | ||||
deposit_id = 1033 | deposit_id = 1033 | ||||
deposit_status_xml_path = os.path.join( | deposit_status_xml_path = os.path.join( | ||||
datadir, f"https_{api_url_basename}", f"1_test_{deposit_id}_status" | datadir, f"https_{api_url_basename}", f"1_test_{deposit_id}_status" | ||||
) | ) | ||||
with open(deposit_status_xml_path, "r") as f: | with open(deposit_status_xml_path, "r") as f: | ||||
Show All 31 Lines |