test_transports.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:wampy 作者: noisyboiler 项目源码 文件源码
def test_ipv4_secure_websocket_connection_by_router_url(self, router):
        assert router.url == "wss://localhost:9443"

        try:
            ssl.PROTOCOL_TLSv1_2
        except AttributeError:
            pytest.skip('Python Environment does not support TLS')

        with DateService(
            url="wss://localhost:9443",
            cert_path="./wampy/testing/keys/server_cert.pem",
        ) as service:
            wait_for_registrations(service, 1)

            client = Client(
                url="wss://localhost:9443",
                cert_path="./wampy/testing/keys/server_cert.pem",
            )
            with client:
                wait_for_session(client)
                result = client.rpc.get_todays_date()

        today = date.today()

        assert result == today.isoformat()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号