Beispiel #1
0
    def test_random_processor(self):
        random.seed(0)
        processor = Processor(self.sources, self.triggers, self.handlers)
        results = processor.main()

        self.assertEqual(results.keys(), self.handlers)
        results = results.values()[0]
        expected = [{'int': r} for r in [4, 5, 8, 6]]
        self.assertEqual(results, expected)
Beispiel #2
0
    def test_random_processor(self):
        random.seed(0)
        processor = Processor(self.sources, self.triggers, self.handlers)
        results = processor.main()

        self.assertEqual(results.keys(), self.handlers)
        results = results.values()[0]
        expected = [ {'int': r} for r in [4, 5, 8, 6] ]
        self.assertEqual(results, expected)
Beispiel #3
0
 def test_empty_processor(self):
     processor = Processor()
     self.assertEqual(list(processor.process()), [])
     self.assertEqual(processor.main(), {})
Beispiel #4
0
 def test_empty_processor(self):
     processor = Processor()
     self.assertEqual(list(processor.process()), [])
     self.assertEqual(processor.main(), {})