def test_tar_only_calls_extract():
"""Only calls extract if only extract specified."""
context = Context({
'key1': 'value1',
'key2': 'value2',
'key3': 'value3',
'tarExtract': [
{'in': 'key2',
'out': 'ARB_GET_ME1'},
{'in': 'key4',
'out': 'ARB_GET_ME2'}
]
})
with patch.multiple('pypyr.steps.tar',
tar_archive=DEFAULT,
tar_extract=DEFAULT
) as mock_tar:
pypyr.steps.tar.run_step(context)
mock_tar['tar_extract'].assert_called_once()
mock_tar['tar_archive'].assert_not_called()
评论列表
文章目录