Пример #1
0
    def setUp(self):
        filter = _OldBuildFilterSet()

        ss_filter = SourceStampFilter(codebase_eq=['cb1', 'cb2'],
                                      repository_eq=['rp1', 'rp2'],
                                      branch_eq=['br1', 'br2'])
        filter.add_filter(['bldr1', 'bldr2'], ss_filter)
        self.cancellations = []
        self.tracker = _OldBuildTracker(filter, self.on_cancel)
Пример #2
0
    def test_multiple_filters_on_builder(self, name, builder, props, expected):
        filter = _OldBuildFilterSet()
        filter.add_filter(['builder1'], SourceStampFilter(project_eq='p'))
        filter.add_filter(['builder1'], SourceStampFilter(repository_eq='r'))

        self.assertEqual(filter.is_matched(builder, props), expected)
Пример #3
0
 def test_empty_filter(self):
     filter = _OldBuildFilterSet()
     self.assertFalse(filter.is_matched('builder', {'prop': 'value'}))