Changeset View
Changeset View
Standalone View
Standalone View
swh/vault/tests/test_cli.py
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | def test_cook_directory(obj_type, cooker_name_suffix, swhid_type, mocker): | ||||
if result.exception is not None: | if result.exception is not None: | ||||
raise result.exception | raise result.exception | ||||
cooker_cls.assert_called_once_with( | cooker_cls.assert_called_once_with( | ||||
f"{obj_type}_{cooker_name_suffix}" if cooker_name_suffix else obj_type, | f"{obj_type}_{cooker_name_suffix}" if cooker_name_suffix else obj_type, | ||||
b"\x00" * 20, | b"\x00" * 20, | ||||
backend, | backend, | ||||
storage, | storage, | ||||
None, | |||||
) | ) | ||||
cooker.cook.assert_called_once_with() | cooker.cook.assert_called_once_with() | ||||
assert result.stdout_bytes == b"bundle content" | assert result.stdout_bytes == b"bundle content" |