def test_nsva(self): subj = ModuleSubject(MODULE_NSVA) result = list( subj.get_module_form_possibilities(forms=hawkey.MODULE_FORM_NSVA)) self.assertEqual(len(result), 1) actual = result[0] expected = NSVCAP(name="module-name", stream="stream", version=1, arch="x86_64", profile=None) self.assertEqual(actual, expected) # empty profile spec -> no profile subj = ModuleSubject(MODULE_NSVA + "/") result = list( subj.get_module_form_possibilities(forms=hawkey.MODULE_FORM_NSVA)) self.assertEqual(len(result), 1) actual = result[0] expected = NSVCAP(name="module-name", stream="stream", version=1, arch="x86_64", profile=None) self.assertEqual(actual, expected)
def test_nsvp(self): subj = ModuleSubject(MODULE_NSVP) result = list(subj.get_module_form_possibilities(forms=hawkey.MODULE_FORM_NSVP)) self.assertEqual(len(result), 1) actual = result[0] expected = NSVCAP(name="module-name", stream="stream", version=1, arch=None, profile="profile") self.assertEqual(actual, expected)
def test_all(self): subj = ModuleSubject(MODULE_NSVAP) result = list(subj.get_module_form_possibilities()) self.assertEqual(len(result), 1) actual = result[0] expected = NSVCAP(name="module-name", stream="stream", version=1, arch="x86_64", profile="profile") self.assertEqual(actual, expected)