示例#1
0
 def test_with_unknown_model_series(self):
     warnings = []
     errors = []
     validate.validate_model(
         {'release-model': 'not-a-model'},
         'ocata',
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(1, len(errors))
示例#2
0
 def test_with_model_series(self):
     warnings = []
     errors = []
     validate.validate_model(
         {'release-model': 'cycle-with-intermediary'},
         'ocata',
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(0, len(errors))
示例#3
0
 def test_with_independent_and_model(self):
     warnings = []
     errors = []
     validate.validate_model(
         {'release-model': 'independent'},
         'ocata',
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(1, len(errors))
示例#4
0
 def test_with_model_independent_nomatch(self):
     warnings = []
     errors = []
     validate.validate_model(
         {'release-model': 'cycle-with-intermediary'},
         '_independent',
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(1, len(errors))
示例#5
0
 def test_no_model_independent(self):
     warnings = []
     errors = []
     validate.validate_model(
         {},
         '_independent',
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(0, len(errors))
示例#6
0
 def test_no_model_series(self):
     warnings = []
     errors = []
     validate.validate_model(
         {},
         'ocata',
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(1, len(errors))