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))
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))
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))
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))
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))
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))