예제 #1
0
    def test_describe_is_called_for_single_processor(self):
        pipeline = Pipeline('name_pipeline', [
            Concreter(),
        ])

        description = pipeline.__str__()
        Concreter.__str__.assert_called_once()
        self.assertEquals('Pipeline : {\'type\': \'concreter\'}', description)
예제 #2
0
 def test_describe_is_called_for_several_processors(self):
     pipeline = Pipeline('name_pipeline', [
         Concreter(),
         Concreter(),
     ])
     description = pipeline.__str__()
     self.assertEquals(
         'Pipeline : {\'type\': \'concreter1\'} -> {\'type\': \'concreter2\'}',
         description)