예제 #1
0
 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))
예제 #2
0
 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')
     ])
예제 #3
0
 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')])
예제 #4
0
 def testCanCreateTransformationWithQuotedValue(self):
     transformations = tratihubis._LabelTransformations(
         self.repo, 'type="software defect": bug')
     self.assertEqual(transformations._transformations,
                      [('type', 'software defect', 'bug')])
예제 #5
0
 def testCanCreateSingleTransformation(self):
     transformations = tratihubis._LabelTransformations(
         self.repo, 'type=defect: bug')
     self.assertEqual(transformations._transformations,
                      [('type', 'defect', 'bug')])
예제 #6
0
 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))
예제 #7
0
 def testCanCreateTransformationWithQuotedValue(self):
     transformations = tratihubis._LabelTransformations(self.repo, 'type="software defect": bug')
     self.assertEqual(transformations._transformations, [('type', 'software defect', 'bug')])
예제 #8
0
 def testCanCreateSingleTransformation(self):
     transformations = tratihubis._LabelTransformations(self.repo, 'type=defect: bug')
     self.assertEqual(transformations._transformations, [('type', 'defect', 'bug')])