@classmethod
    def setUpClass(cls):
        """Create a new topic and subscription with a random name."""
        random_id = uuid.uuid4()
        cls.topic = 'topic-%s' % random_id
        cls.sub = random_id % 'sub-%s'
        main(['pubsub_sample.py', get_project_id(), 'create_topic',
              cls.topic])
        main(['pubsub_sample.py', get_project_id(), 'create_subscription',
              cls.sub, cls.topic])
        # The third message is to check the consistency between base64
        # variants used on the server side and the client side.
        cls.messages = ['message-1-%s' % uuid.uuid4(),
                        'message-2-%s' % uuid.uuid4(),
                        '=@~']
dataset/ETHPy150Open GoogleCloudPlatform/cloud-pubsub-samples-python/cmdline-pull/test_pubsub_sample.py/PubsubSampleTestCase.setUpClass/swapped operands of `%`