Ejemplo n.º 1
0
 def test_invalid_prefix(self):
     deliverable_info = {
         'branches': [
             {'name': 'invalid/branch'},
         ],
     }
     warnings = []
     errors = []
     validate.validate_branch_prefixes(
         deliverable_info,
         warnings.append,
         errors.append,
     )
     self.assertEqual(0, len(warnings))
     self.assertEqual(1, len(errors))
Ejemplo n.º 2
0
 def test_valid_prefix(self):
     warnings = []
     errors = []
     for prefix in validate._VALID_BRANCH_PREFIXES:
         deliverable_info = {
             'branches': [
                 {'name': '%s/branch' % prefix},
             ],
         }
         validate.validate_branch_prefixes(
             deliverable_info,
             warnings.append,
             errors.append,
         )
     self.assertEqual(0, len(warnings))
     self.assertEqual(0, len(errors))