def testFailsOnNonExistentLabel(self): try: tratihubis._LabelTransformations(self.repo, 'type=defect: no_such_label') self.fail() except tratihubis._ConfigError, error: self.assertTrue('unknown label' in unicode(error))
def testCanCreateMultipleTransformation(self): transformations = tratihubis._LabelTransformations(self.repo, 'type=defect: bug, type=enhancement: enhancement, resolution=wontfix: wontfix') self.assertEqual(transformations._transformations, [ ('type', 'defect', 'bug'), ('type', 'enhancement', 'enhancement'), ('resolution', 'wontfix', 'wontfix') ])
def testCanCreateMultipleTransformation(self): transformations = tratihubis._LabelTransformations( self.repo, 'type=defect: bug, type=enhancement: enhancement, resolution=wontfix: wontfix' ) self.assertEqual(transformations._transformations, [('type', 'defect', 'bug'), ('type', 'enhancement', 'enhancement'), ('resolution', 'wontfix', 'wontfix')])
def testCanCreateTransformationWithQuotedValue(self): transformations = tratihubis._LabelTransformations( self.repo, 'type="software defect": bug') self.assertEqual(transformations._transformations, [('type', 'software defect', 'bug')])
def testCanCreateSingleTransformation(self): transformations = tratihubis._LabelTransformations( self.repo, 'type=defect: bug') self.assertEqual(transformations._transformations, [('type', 'defect', 'bug')])
def testCanCreateTransformationWithQuotedValue(self): transformations = tratihubis._LabelTransformations(self.repo, 'type="software defect": bug') self.assertEqual(transformations._transformations, [('type', 'software defect', 'bug')])
def testCanCreateSingleTransformation(self): transformations = tratihubis._LabelTransformations(self.repo, 'type=defect: bug') self.assertEqual(transformations._transformations, [('type', 'defect', 'bug')])