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()
示例#2
0
文件: test_ssl.py 项目: pubnub/python
    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()
示例#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()
示例#4
0
文件: test_ssl.py 项目: pubnub/python
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()