Пример #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')])