def test_list_topics(self):
        """Test the list_topics action."""
        expected_topic = ('projects/%s/topics/%s'
                          % (get_project_id(), self.topic))
        with captured_output() as (out, _):
            main(['pubsub_sample.py', get_project_id(), 'list_topics'])
        output = out.getvalue().strip()
        self.assertTrue(expected_topic in output)
dataset/ETHPy150Open GoogleCloudPlatform/cloud-pubsub-samples-python/cmdline-pull/test_pubsub_sample.py/PubsubSampleTestCase.test_list_topics/original