def publish(client, pubsub_topic, data_line, msg_attributes=None):
    data = base64.b64encode(data_line)
    msg_payload = {'data': data}
    if msg_attributes:
        msg_payload['attributes'] = msg_attributes
    body = {'messages': [msg_payload]}
    resp = client.projects().topics().publish(
        topic=pubsub_topic, body=body).execute(num_retries=NUM_RETRIES)
    return resp
The body of a L{defer.inlineCallbacks} decorated test gets run.
dataset/ETHPy150Open GoogleCloudPlatform/cloud-pubsub-samples-python/gce-cmdline-publisher/traffic_pubsub_generator.py/publish--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/trial/test/test_deferred.py/DeferredTests.test_passInlineCallbacks