vinissimus / async-asgi-testclient

A framework-agnostic library for testing ASGI web applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use `wss://` as the scheme for WebSocket tests

shevron opened this issue · comments

I'm testing an app that needs to know whether a WebSocket connection was done over ws:// or wss://. Currently, while I can override the scheme for HTTP requests, I cannot set the scheme used for WebSocket connections. Moreover, overriding this behavior via subclassing for example is quite difficult as the scheme is hard-coded inside the WebSocketSession.connect() method which is quite extensive.

It would be helpful if I could override the WS connection scheme and set it to wss:// or ws:// explicitly.