iso-wrapper: Remove the class
It really is just a group of independent functions, so we can simplify it by removing the unused wrapper class. Instead of importing the wrapper, instantiating it and calling its methods we can import the module and call its functions directly. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
b2b5dd919b
commit
e58c78fd2f
11 changed files with 333 additions and 345 deletions
|
|
@ -636,11 +636,10 @@ class TestSymlinkIso(PungiTestCase):
|
|||
@mock.patch('pungi.phases.buildinstall.Image')
|
||||
@mock.patch('pungi.phases.buildinstall.get_mtime')
|
||||
@mock.patch('pungi.phases.buildinstall.get_file_size')
|
||||
@mock.patch('pungi.phases.buildinstall.IsoWrapper')
|
||||
@mock.patch('pungi.phases.buildinstall.iso')
|
||||
@mock.patch('pungi.phases.buildinstall.run')
|
||||
def test_hardlink(self, run, IsoWrapperCls, get_file_size, get_mtime, ImageCls):
|
||||
def test_hardlink(self, run, iso, get_file_size, get_mtime, ImageCls):
|
||||
self.compose.conf = {'buildinstall_symlink': False, 'disc_types': {}}
|
||||
IsoWrapper = IsoWrapperCls.return_value
|
||||
get_file_size.return_value = 1024
|
||||
get_mtime.return_value = 13579
|
||||
|
||||
|
|
@ -655,14 +654,14 @@ class TestSymlinkIso(PungiTestCase):
|
|||
self.compose.get_image_name.mock_calls,
|
||||
[mock.call('x86_64', self.compose.variants['Server'],
|
||||
disc_type='boot', disc_num=None, suffix='.iso')])
|
||||
self.assertItemsEqual(IsoWrapper.get_implanted_md5.mock_calls,
|
||||
self.assertItemsEqual(iso.get_implanted_md5.mock_calls,
|
||||
[mock.call(tgt)])
|
||||
self.assertItemsEqual(IsoWrapper.get_manifest_cmd.mock_calls,
|
||||
self.assertItemsEqual(iso.get_manifest_cmd.mock_calls,
|
||||
[mock.call('image-name')])
|
||||
self.assertItemsEqual(IsoWrapper.get_volume_id.mock_calls,
|
||||
self.assertItemsEqual(iso.get_volume_id.mock_calls,
|
||||
[mock.call(tgt)])
|
||||
self.assertItemsEqual(run.mock_calls,
|
||||
[mock.call(IsoWrapper.get_manifest_cmd.return_value,
|
||||
[mock.call(iso.get_manifest_cmd.return_value,
|
||||
workdir=self.topdir + '/compose/Server/x86_64/iso')])
|
||||
|
||||
image = ImageCls.return_value
|
||||
|
|
@ -675,7 +674,7 @@ class TestSymlinkIso(PungiTestCase):
|
|||
self.assertEqual(image.disc_number, 1)
|
||||
self.assertEqual(image.disc_count, 1)
|
||||
self.assertEqual(image.bootable, True)
|
||||
self.assertEqual(image.implant_md5, IsoWrapper.get_implanted_md5.return_value)
|
||||
self.assertEqual(image.implant_md5, iso.get_implanted_md5.return_value)
|
||||
self.assertEqual(image.can_fail, False)
|
||||
self.assertEqual(self.compose.im.add.mock_calls,
|
||||
[mock.call('Server', 'x86_64', image)])
|
||||
|
|
@ -683,14 +682,13 @@ class TestSymlinkIso(PungiTestCase):
|
|||
@mock.patch('pungi.phases.buildinstall.Image')
|
||||
@mock.patch('pungi.phases.buildinstall.get_mtime')
|
||||
@mock.patch('pungi.phases.buildinstall.get_file_size')
|
||||
@mock.patch('pungi.phases.buildinstall.IsoWrapper')
|
||||
@mock.patch('pungi.phases.buildinstall.iso')
|
||||
@mock.patch('pungi.phases.buildinstall.run')
|
||||
def test_hardlink_with_custom_type(self, run, IsoWrapperCls, get_file_size, get_mtime, ImageCls):
|
||||
def test_hardlink_with_custom_type(self, run, iso, get_file_size, get_mtime, ImageCls):
|
||||
self.compose.conf = {
|
||||
'buildinstall_symlink': False,
|
||||
'disc_types': {'boot': 'netinst'},
|
||||
}
|
||||
IsoWrapper = IsoWrapperCls.return_value
|
||||
get_file_size.return_value = 1024
|
||||
get_mtime.return_value = 13579
|
||||
|
||||
|
|
@ -705,14 +703,14 @@ class TestSymlinkIso(PungiTestCase):
|
|||
self.compose.get_image_name.mock_calls,
|
||||
[mock.call('x86_64', self.compose.variants['Server'],
|
||||
disc_type='netinst', disc_num=None, suffix='.iso')])
|
||||
self.assertItemsEqual(IsoWrapper.get_implanted_md5.mock_calls,
|
||||
self.assertItemsEqual(iso.get_implanted_md5.mock_calls,
|
||||
[mock.call(tgt)])
|
||||
self.assertItemsEqual(IsoWrapper.get_manifest_cmd.mock_calls,
|
||||
self.assertItemsEqual(iso.get_manifest_cmd.mock_calls,
|
||||
[mock.call('image-name')])
|
||||
self.assertItemsEqual(IsoWrapper.get_volume_id.mock_calls,
|
||||
self.assertItemsEqual(iso.get_volume_id.mock_calls,
|
||||
[mock.call(tgt)])
|
||||
self.assertItemsEqual(run.mock_calls,
|
||||
[mock.call(IsoWrapper.get_manifest_cmd.return_value,
|
||||
[mock.call(iso.get_manifest_cmd.return_value,
|
||||
workdir=self.topdir + '/compose/Server/x86_64/iso')])
|
||||
|
||||
image = ImageCls.return_value
|
||||
|
|
@ -725,7 +723,7 @@ class TestSymlinkIso(PungiTestCase):
|
|||
self.assertEqual(image.disc_number, 1)
|
||||
self.assertEqual(image.disc_count, 1)
|
||||
self.assertEqual(image.bootable, True)
|
||||
self.assertEqual(image.implant_md5, IsoWrapper.get_implanted_md5.return_value)
|
||||
self.assertEqual(image.implant_md5, iso.get_implanted_md5.return_value)
|
||||
self.assertEqual(image.can_fail, True)
|
||||
self.assertEqual(self.compose.im.add.mock_calls,
|
||||
[mock.call('Server', 'x86_64', image)])
|
||||
|
|
|
|||
|
|
@ -208,11 +208,11 @@ class CreateisoPhaseTest(helpers.PungiTestCase):
|
|||
|
||||
class CreateisoThreadTest(helpers.PungiTestCase):
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_in_runroot(self, KojiWrapper, get_file_size, get_mtime, IsoWrapper):
|
||||
def test_process_in_runroot(self, KojiWrapper, get_file_size, get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -256,9 +256,9 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
run_runroot.call_args_list,
|
||||
[mock.call(get_runroot_cmd.return_value,
|
||||
log_file='%s/logs/x86_64/createiso-image-name.x86_64.log' % self.topdir)])
|
||||
self.assertEqual(IsoWrapper.return_value.get_implanted_md5.call_args_list,
|
||||
self.assertEqual(iso.get_implanted_md5.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
self.assertEqual(IsoWrapper.return_value.get_volume_id.call_args_list,
|
||||
self.assertEqual(iso.get_volume_id.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
|
||||
self.assertEqual(len(compose.im.add.call_args_list), 1)
|
||||
|
|
@ -272,11 +272,11 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
self.assertEqual(image.type, 'dvd')
|
||||
self.assertEqual(image.subvariant, 'Server')
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_source_iso(self, KojiWrapper, get_file_size, get_mtime, IsoWrapper):
|
||||
def test_process_source_iso(self, KojiWrapper, get_file_size, get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -320,9 +320,9 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
run_runroot.call_args_list,
|
||||
[mock.call(get_runroot_cmd.return_value,
|
||||
log_file='%s/logs/src/createiso-image-name.src.log' % self.topdir)])
|
||||
self.assertEqual(IsoWrapper.return_value.get_implanted_md5.call_args_list,
|
||||
self.assertEqual(iso.get_implanted_md5.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
self.assertEqual(IsoWrapper.return_value.get_volume_id.call_args_list,
|
||||
self.assertEqual(iso.get_volume_id.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
|
||||
self.assertEqual(len(compose.im.add.call_args_list), 2)
|
||||
|
|
@ -336,11 +336,11 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
self.assertEqual(image.type, 'dvd')
|
||||
self.assertEqual(image.subvariant, 'Server')
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_bootable(self, KojiWrapper, get_file_size, get_mtime, IsoWrapper):
|
||||
def test_process_bootable(self, KojiWrapper, get_file_size, get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -386,9 +386,9 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
run_runroot.call_args_list,
|
||||
[mock.call(get_runroot_cmd.return_value,
|
||||
log_file='%s/logs/x86_64/createiso-image-name.x86_64.log' % self.topdir)])
|
||||
self.assertEqual(IsoWrapper.return_value.get_implanted_md5.call_args_list,
|
||||
self.assertEqual(iso.get_implanted_md5.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
self.assertEqual(IsoWrapper.return_value.get_volume_id.call_args_list,
|
||||
self.assertEqual(iso.get_volume_id.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
|
||||
self.assertEqual(len(compose.im.add.call_args_list), 1)
|
||||
|
|
@ -402,12 +402,12 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
self.assertEqual(image.type, 'dvd')
|
||||
self.assertEqual(image.subvariant, 'Server')
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_in_runroot_non_existing_tag(self, KojiWrapper, get_file_size,
|
||||
get_mtime, IsoWrapper):
|
||||
get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -434,11 +434,11 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
|
||||
self.assertEqual('Tag "f25-build" does not exist.', str(ctx.exception))
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_in_runroot_crash(self, KojiWrapper, get_file_size, get_mtime, IsoWrapper):
|
||||
def test_process_in_runroot_crash(self, KojiWrapper, get_file_size, get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -472,11 +472,11 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
mock.call('BOOM')
|
||||
])
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_in_runroot_fail(self, KojiWrapper, get_file_size, get_mtime, IsoWrapper):
|
||||
def test_process_in_runroot_fail(self, KojiWrapper, get_file_size, get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -515,12 +515,12 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
% (self.topdir + '/logs/x86_64/createiso-image-name.x86_64.log'))
|
||||
])
|
||||
|
||||
@mock.patch('pungi.phases.createiso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.createiso.iso')
|
||||
@mock.patch('pungi.phases.createiso.get_mtime')
|
||||
@mock.patch('pungi.phases.createiso.get_file_size')
|
||||
@mock.patch('pungi.phases.createiso.run')
|
||||
@mock.patch('pungi.phases.createiso.KojiWrapper')
|
||||
def test_process_locally(self, KojiWrapper, run, get_file_size, get_mtime, IsoWrapper):
|
||||
def test_process_locally(self, KojiWrapper, run, get_file_size, get_mtime, iso):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'release_short': 'test',
|
||||
'release_version': '1.0',
|
||||
|
|
@ -547,9 +547,9 @@ class CreateisoThreadTest(helpers.PungiTestCase):
|
|||
run.call_args_list,
|
||||
[mock.call(cmd['cmd'], show_cmd=True,
|
||||
logfile='%s/logs/x86_64/createiso-image-name.x86_64.log' % self.topdir)])
|
||||
self.assertEqual(IsoWrapper.return_value.get_implanted_md5.call_args_list,
|
||||
self.assertEqual(iso.get_implanted_md5.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
self.assertEqual(IsoWrapper.return_value.get_volume_id.call_args_list,
|
||||
self.assertEqual(iso.get_volume_id.call_args_list,
|
||||
[mock.call(cmd['iso_path'])])
|
||||
|
||||
self.assertEqual(len(compose.im.add.call_args_list), 1)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
'image_volid_formats': ['{release_short}-{variant}-{arch}'],
|
||||
})
|
||||
|
||||
def assertImageAdded(self, compose, ImageCls, IsoWrapper):
|
||||
def assertImageAdded(self, compose, ImageCls, iso):
|
||||
image = ImageCls.return_value
|
||||
self.assertEqual(image.path, 'Everything/x86_64/iso/image-name')
|
||||
self.assertEqual(image.mtime, 13579)
|
||||
|
|
@ -66,7 +66,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
self.assertEqual(image.disc_number, 1)
|
||||
self.assertEqual(image.disc_count, 1)
|
||||
self.assertEqual(image.bootable, True)
|
||||
self.assertEqual(image.implant_md5, IsoWrapper.return_value.get_implanted_md5.return_value)
|
||||
self.assertEqual(image.implant_md5, iso.get_implanted_md5.return_value)
|
||||
self.assertEqual(compose.im.add.mock_calls,
|
||||
[mock.call('Everything', 'x86_64', image)])
|
||||
|
||||
|
|
@ -111,10 +111,10 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.ostree_installer.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_run(self, KojiWrapper, link, IsoWrapper,
|
||||
def test_run(self, KojiWrapper, link, iso,
|
||||
get_file_size, get_mtime, ImageCls, run):
|
||||
self.compose.supported = False
|
||||
pool = mock.Mock()
|
||||
|
|
@ -140,17 +140,17 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
'file://%s/compose/Everything/x86_64/os' % self.topdir,
|
||||
cfg['release'])
|
||||
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
|
||||
self.assertImageAdded(self.compose, ImageCls, IsoWrapper)
|
||||
self.assertImageAdded(self.compose, ImageCls, iso)
|
||||
self.assertAllCopied(run)
|
||||
|
||||
@mock.patch('kobo.shortcuts.run')
|
||||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.ostree_installer.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_run_external_source(self, KojiWrapper, link, IsoWrapper,
|
||||
def test_run_external_source(self, KojiWrapper, link, iso,
|
||||
get_file_size, get_mtime, ImageCls, run):
|
||||
pool = mock.Mock()
|
||||
cfg = {
|
||||
|
|
@ -173,18 +173,18 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
|
||||
self.assertRunrootCall(koji, 'http://example.com/repo/x86_64/', cfg['release'], isfinal=True)
|
||||
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
|
||||
self.assertImageAdded(self.compose, ImageCls, IsoWrapper)
|
||||
self.assertImageAdded(self.compose, ImageCls, iso)
|
||||
self.assertAllCopied(run)
|
||||
|
||||
@mock.patch('kobo.shortcuts.run')
|
||||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.wrappers.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_fail_with_relative_template_path_but_no_repo(self, KojiWrapper, link,
|
||||
IsoWrapper, get_file_size,
|
||||
iso, get_file_size,
|
||||
get_mtime, ImageCls, run):
|
||||
pool = mock.Mock()
|
||||
cfg = {
|
||||
|
|
@ -213,10 +213,10 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.ostree_installer.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_run_clone_templates(self, KojiWrapper, link, IsoWrapper,
|
||||
def test_run_clone_templates(self, KojiWrapper, link, iso,
|
||||
get_file_size, get_mtime, ImageCls, run,
|
||||
get_dir_from_scm):
|
||||
pool = mock.Mock()
|
||||
|
|
@ -254,17 +254,17 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
extra=['--add-template=%s/some_file.txt' % templ_dir,
|
||||
'--add-arch-template=%s/other_file.txt' % templ_dir])
|
||||
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
|
||||
self.assertImageAdded(self.compose, ImageCls, IsoWrapper)
|
||||
self.assertImageAdded(self.compose, ImageCls, iso)
|
||||
self.assertAllCopied(run)
|
||||
|
||||
@mock.patch('kobo.shortcuts.run')
|
||||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.ostree_installer.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_run_with_implicit_release(self, KojiWrapper, link, IsoWrapper,
|
||||
def test_run_with_implicit_release(self, KojiWrapper, link, iso,
|
||||
get_file_size, get_mtime, ImageCls, run):
|
||||
pool = mock.Mock()
|
||||
cfg = {
|
||||
|
|
@ -312,17 +312,17 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
'--add-arch-template-var=ostree_ref=fedora-atomic/Rawhide/x86_64/docker-host']
|
||||
)
|
||||
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
|
||||
self.assertImageAdded(self.compose, ImageCls, IsoWrapper)
|
||||
self.assertImageAdded(self.compose, ImageCls, iso)
|
||||
self.assertAllCopied(run)
|
||||
|
||||
@mock.patch('kobo.shortcuts.run')
|
||||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.ostree_installer.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_fail_crash(self, KojiWrapper, link, IsoWrapper, get_file_size,
|
||||
def test_fail_crash(self, KojiWrapper, link, iso, get_file_size,
|
||||
get_mtime, ImageCls, run):
|
||||
pool = mock.Mock()
|
||||
cfg = {
|
||||
|
|
@ -345,10 +345,10 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
|||
@mock.patch('productmd.images.Image')
|
||||
@mock.patch('pungi.util.get_mtime')
|
||||
@mock.patch('pungi.util.get_file_size')
|
||||
@mock.patch('pungi.wrappers.iso.IsoWrapper')
|
||||
@mock.patch('pungi.phases.ostree_installer.iso')
|
||||
@mock.patch('os.link')
|
||||
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
|
||||
def test_fail_runroot_fail(self, KojiWrapper, link, IsoWrapper,
|
||||
def test_fail_runroot_fail(self, KojiWrapper, link, iso,
|
||||
get_file_size, get_mtime, ImageCls, run):
|
||||
pool = mock.Mock()
|
||||
cfg = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue