Coming from usage of Flask-SocketIO.
from api.sockets import socket_io
def test_socketio(app, app_test_client):
"""Test that SocketIO connects."""
socketio_test_client = socket_io.test_client(
app, flask_test_client=app_test_client
)
assert not socketio_test_client.is_connected()
the namespace is defined as follows:
from flask_socketio import Namespace, SocketIO
from api.context import get_user
socket_io = SocketIO() # SocketIO server - initialized within app init
class RootNamespace(Namespace):
def on_connect(self):
"""Event handler for connecting to a namespace."""
return get_user() is not None
socket_io.on_namespace(RootNamespace("/"))
this unit test fails against 4.4.0 but passes against 4.3.1. did the behavior of on_connect get indirectly changed by this version bump?
Coming from usage of Flask-SocketIO.
the namespace is defined as follows:
this unit test fails against 4.4.0 but passes against 4.3.1. did the behavior of
on_connectget indirectly changed by this version bump?