- Unittests are fixed
This commit is contained in:
parent
f430e3fc9a
commit
bf463b37c0
@ -879,20 +879,14 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
|
||||
def test_adding_module(self):
|
||||
variant = mock.Mock(arches=[
|
||||
# "armhfp",
|
||||
"x86_64"
|
||||
], arch_mmds={}, modules=[])
|
||||
|
||||
source_koji._add_module_to_variant(self.koji, variant, self.buildinfo)
|
||||
source_kojimock._add_module_to_variant(self.koji, variant, self.buildinfo)
|
||||
|
||||
self.assertEqual(
|
||||
variant.arch_mmds,
|
||||
{
|
||||
# "armhfp": {
|
||||
# "module:master:20190318:abcdef": MockModule(
|
||||
# "/mnt/koji/modules/armv7hl/module:master-20190318-abcdef"
|
||||
# ),
|
||||
# },
|
||||
"x86_64": {
|
||||
"module:master:20190318:abcdef": MockModule(
|
||||
"/mnt/koji/modules/fake_arch/module:master-20190318-abcdef"
|
||||
@ -905,7 +899,6 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
def test_adding_module_to_existing(self):
|
||||
variant = mock.Mock(
|
||||
arches=[
|
||||
# "armhfp",
|
||||
"x86_64"
|
||||
],
|
||||
arch_mmds={
|
||||
@ -914,16 +907,11 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
modules=[{"name": "m1:latest-20190101:cafe", "glob": False}],
|
||||
)
|
||||
|
||||
source_koji._add_module_to_variant(self.koji, variant, self.buildinfo)
|
||||
source_kojimock._add_module_to_variant(self.koji, variant, self.buildinfo)
|
||||
|
||||
self.assertEqual(
|
||||
variant.arch_mmds,
|
||||
{
|
||||
# "armhfp": {
|
||||
# "module:master:20190318:abcdef": MockModule(
|
||||
# "/mnt/koji/modules/armv7hl/module:master-20190318-abcdef"
|
||||
# ),
|
||||
# },
|
||||
"x86_64": {
|
||||
"module:master:20190318:abcdef": MockModule(
|
||||
"/mnt/koji/modules/fake_arch/module:master-20190318-abcdef"
|
||||
@ -938,22 +926,16 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
|
||||
def test_adding_module_with_add_module(self):
|
||||
variant = mock.Mock(arches=[
|
||||
# "armhfp",
|
||||
"x86_64"
|
||||
], arch_mmds={}, modules=[])
|
||||
|
||||
source_koji._add_module_to_variant(
|
||||
source_kojimock._add_module_to_variant(
|
||||
self.koji, variant, self.buildinfo, add_to_variant_modules=True
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
variant.arch_mmds,
|
||||
{
|
||||
# "armhfp": {
|
||||
# "module:master:20190318:abcdef": MockModule(
|
||||
# "/mnt/koji/modules/module:master-20190318-abcdef"
|
||||
# ),
|
||||
# },
|
||||
"x86_64": {
|
||||
"module:master:20190318:abcdef": MockModule(
|
||||
"/mnt/koji/modules/fake_arch/module:master-20190318-abcdef"
|
||||
@ -968,7 +950,6 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
def test_adding_module_to_existing_with_add_module(self):
|
||||
variant = mock.Mock(
|
||||
arches=[
|
||||
# "armhfp",
|
||||
"x86_64"
|
||||
],
|
||||
arch_mmds={
|
||||
@ -977,18 +958,13 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
modules=[{"name": "m1:latest-20190101:cafe", "glob": False}],
|
||||
)
|
||||
|
||||
source_koji._add_module_to_variant(
|
||||
source_kojimock._add_module_to_variant(
|
||||
self.koji, variant, self.buildinfo, add_to_variant_modules=True
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
variant.arch_mmds,
|
||||
{
|
||||
# "armhfp": {
|
||||
# "module:master:20190318:abcdef": MockModule(
|
||||
# "/koji/modulemd.armv7hl.txt"
|
||||
# ),
|
||||
# },
|
||||
"x86_64": {
|
||||
"module:master:20190318:abcdef": MockModule(
|
||||
"/mnt/koji/modules/fake_arch/module:master-20190318-abcdef"
|
||||
@ -1011,12 +987,11 @@ class TestAddModuleToVariantForKojiMock(helpers.PungiTestCase):
|
||||
)
|
||||
variant = mock.Mock(
|
||||
arches=[
|
||||
# "armhfp",
|
||||
"x86_64"
|
||||
], arch_mmds={}, modules=[], uid="Variant"
|
||||
)
|
||||
|
||||
nsvc = source_koji._add_module_to_variant(
|
||||
nsvc = source_kojimock._add_module_to_variant(
|
||||
self.koji,
|
||||
variant,
|
||||
self.buildinfo,
|
||||
|
Loading…
Reference in New Issue
Block a user