示例#1
0
 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)
示例#2
0
 def test_valid2(self):
     kwargs = {'package_def': {
         'name': 'Package1',
         'params': {'dirname': 'Program Files'},
     }}
     utils.val_package_def(**kwargs)
示例#3
0
 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)
示例#4
0
 def test_valid1(self):
     kwargs = {'package_def': {'name': 'Package1'}}
     utils.val_package_def(**kwargs)