async-asgi-testclient
async-asgi-testclient copied to clipboard
Cannot use `wss://` as the scheme for WebSocket tests
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.