def test_tar_calls_archive_and_extract():
"""Calls both extract and archive when both specified."""
context = Context({
'key2': 'value2',
'key1': 'value1',
'key3': 'value3',
'tarArchive': [
{'in': 'key2',
'out': 'ARB_GET_ME1'},
{'in': 'key4',
'out': 'ARB_GET_ME2'}
],
'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_called_once()
# ------------------------- tar base ---------------------------------------#
#
# ------------------------- tar extract---------------------------------------#
评论列表
文章目录