modules: Allow context in variants XML

JIRA: COMPOSE-2508
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-04-26 09:01:13 +02:00
parent 8c22236ad4
commit b8555b7869
2 changed files with 18 additions and 6 deletions

View file

@ -344,8 +344,17 @@ class TestCorrectNVR(helpers.PungiTestCase):
self.assertEqual(module_info, expected)
def test_new_nvrc(self):
module_info = source_koji.variant_dict_from_str(self.compose, self.new_nvrc)
expected = {
'name': 'base-runtime',
'stream': 'f26',
'version': '20170502134116',
'context': '0123abcd'}
self.assertEqual(module_info, expected)
def test_new_garbage_value(self):
self.assertRaises(ValueError, source_koji.variant_dict_from_str,
self.compose, self.new_nvrc)
self.compose, 'foo:bar:baz:quux:qaar')
if __name__ == "__main__":