Exemplo n.º 1
0
    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()
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
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()
Exemplo n.º 4
0
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()