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)
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)