def METHOD_NAME(self):
    with self.assertRaisesRegex(ValueError,
                                'task_name and value cannot be both set.'):
        p = pipeline_channel.create_pipeline_channel(
            name='abc',
            channel_type='Integer',
            task_name='task1',
            value=123,
        )