def test_publish_ssl(self): print(sys.version_info) pubnub = PubNubTornado(pnconf_ssl_copy(), custom_ioloop=self.io_loop) msg = "hey" pub = pubnub.publish().channel(ch).message(msg) envelope = yield pub.future() assert isinstance(envelope, TornadoEnvelope) assert isinstance(envelope.result, PNPublishResult) assert isinstance(envelope.status, PNStatus) assert envelope.result.timetoken > 0 assert len(envelope.status.original_response) > 0 pubnub.stop()
async def test_publish_string_via_get_encrypted(event_loop): pubnub = PubNubAsyncio(pnconf_ssl_copy(), custom_event_loop=event_loop) res = await pubnub.publish().channel(ch).message("hey").future() assert res.result.timetoken > 0 await pubnub.stop()
def test_publish_string_via_get_encrypted(event_loop): pubnub = PubNubAsyncio(pnconf_ssl_copy(), custom_event_loop=event_loop) res = yield from pubnub.publish().channel(ch).message("hey").future() assert res.result.timetoken > 0 pubnub.stop()