partial work

This commit is contained in:
Mike McLean
2022-08-23 10:49:38 -04:00
parent 1236fed8b8
commit 46f4f449a8

View File

@@ -324,27 +324,28 @@ data:
mmd = self.get_mmd()
side_tag = "SIDETAG"
params = {
"side_tag": "SIDETAG",
"rpm_component_ref_overrides": {"pkg": "f4836ea0"},
"branch": "f37",
}
"side_tag": "SIDETAG",
"rpm_component_ref_overrides": {"pkg": "f4836ea0"},
"branch": "f37",
}
_apply_xmd_params(mmd, params)
xmd = mmd.get_xmd()
for key in params:
assert xmd["mbs"][key] == params[key]
def test_apply_side_tag_no_option(self):
def test_apply_xmd_params_no_option(self):
"""
Test that the xmd is unchanged when no relevant options are given
"""
mmd = self.get_mmd()
xmd_orig = mmd.get_xmd()
_apply_side_tag(mmd, {})
_apply_xmd_params(mmd, {})
xmd = mmd.get_xmd()
assert xmd == xmd_orig
assert "side_tag" not in xmd.get("mbs", {})
for key in ("side_tag", "rpm_component_ref_overrides", "branch"):
assert key not in xmd.get("mbs", {})
@pytest.mark.usefixtures("reuse_component_init_data")