[koji-wrapper] Use more descriptive method names

The methods mentioning image build are generic and can work for other
task types.

get_image_build_paths -> get_image_paths
run_create_image_cmd -> run_blocking_cmd

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-01-28 14:58:24 +01:00
parent d85f00818d
commit ae30c07553
6 changed files with 19 additions and 15 deletions

View file

@ -349,12 +349,12 @@ class TestCreateImageBuildThread(unittest.TestCase):
"link_type": 'hardlink-or-copy',
}
koji_wrapper = KojiWrapper.return_value
koji_wrapper.run_create_image_cmd.return_value = {
koji_wrapper.run_blocking_cmd.return_value = {
"retcode": 0,
"output": None,
"task_id": 1234,
}
koji_wrapper.get_image_build_paths.return_value = {
koji_wrapper.get_image_paths.return_value = {
'amd64': [
'/koji/task/1235/tdl-amd64.xml',
'/koji/task/1235/Fedora-Docker-Base-20160103.amd64.qcow2',
@ -468,7 +468,7 @@ class TestCreateImageBuildThread(unittest.TestCase):
"link_type": 'hardlink-or-copy',
}
koji_wrapper = KojiWrapper.return_value
koji_wrapper.run_create_image_cmd.return_value = {
koji_wrapper.run_blocking_cmd.return_value = {
"retcode": 1,
"output": None,
"task_id": 1234,
@ -520,7 +520,7 @@ class TestCreateImageBuildThread(unittest.TestCase):
raise RuntimeError('BOOM')
koji_wrapper = KojiWrapper.return_value
koji_wrapper.run_create_image_cmd.side_effect = boom
koji_wrapper.run_blocking_cmd.side_effect = boom
t = CreateImageBuildThread(pool)
with mock.patch('os.stat') as stat: