def test_invalid2(self): e = "Package definition.*has more than one of id, name!" with self.assertRaisesRegexp(DefinitionParserError, e): kwargs = {'package_def': {'name': 'test1', 'id': '2'}} utils.val_package_def(**kwargs)
def test_valid2(self): kwargs = {'package_def': { 'name': 'Package1', 'params': {'dirname': 'Program Files'}, }} utils.val_package_def(**kwargs)
def test_invalid1(self): e = "Package definition.*missing one of id, name!" with self.assertRaisesRegexp(DefinitionParserError, e): kwargs = {'package_def': {'NONAME': 'Package1'}} utils.val_package_def(**kwargs)
def test_valid1(self): kwargs = {'package_def': {'name': 'Package1'}} utils.val_package_def(**kwargs)