gather: Clean up method deps

* Remove unused arguments
 * Remove duplication

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-03-31 10:12:11 +02:00
parent 0168388492
commit dcc1750df2
2 changed files with 18 additions and 25 deletions

View file

@ -28,11 +28,10 @@ class TestWritePungiConfig(helpers.PungiTestCase):
filter = [('pkg3', None), ('pkg4', 'x86_64')]
white = mock.Mock()
black = mock.Mock()
comps_repo = mock.Mock()
prepopulate = mock.Mock()
fulltree = mock.Mock()
deps.write_pungi_config(self.compose, 'x86_64', self.compose.variants['Server'],
pkgs, grps, filter, white, black, comps_repo=comps_repo,
pkgs, grps, filter, white, black,
prepopulate=prepopulate, fulltree_excludes=fulltree)
self.assertWritten(PungiWrapper, packages=['pkg1', 'pkg2.x86_64'],
ks_path=self.topdir + '/work/x86_64/pungi/Server.x86_64.conf',
@ -40,8 +39,7 @@ class TestWritePungiConfig(helpers.PungiTestCase):
groups=['grp1'], prepopulate=prepopulate,
repos={'pungi-repo': self.topdir + '/work/x86_64/repo'},
exclude_packages=['pkg3', 'pkg4.x86_64'],
fulltree_excludes=fulltree,
comps_repo=comps_repo)
fulltree_excludes=fulltree)
@mock.patch('pungi.phases.gather.get_lookaside_repos')
@mock.patch('pungi.phases.gather.methods.method_deps.PungiWrapper')
@ -56,7 +54,7 @@ class TestWritePungiConfig(helpers.PungiTestCase):
multilib_whitelist=[], multilib_blacklist=[],
groups=[], prepopulate=None,
repos={'pungi-repo': self.topdir + '/work/x86_64/repo'},
exclude_packages=[], fulltree_excludes=None, comps_repo=None)
exclude_packages=[], fulltree_excludes=None)
self.assertEqual(glr.call_args_list,
[mock.call(self.compose, 'x86_64', self.compose.variants['Server'])])