-
-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyerror when testing socketio connection with get_received() #295
Comments
What client are you using? How is it initialized? Typically the |
Hi Miguel, by saying client you mean browser or javascript library? The main goal I am trying to archive with this reproducible example is to pass the unit test. |
Nobody connects to the index route you created in your test. So the test will never pass in this form. You can connect to |
Hi, thanks for your help and your speedy response. I don't understand why this test should not pass. As you correctly point out the test client in the unit test does not connect to any route. However, we are trying to assert that no socketIO messages are received by the test client. The failure in this test is an error in calling the function
Is it the case that it is not possible to call the function If this is not the case, can you explain why you don't think this test should pass? |
Sorry. I was sort of thrown off by the way you coded your application, putting an A fix for the KeyError is coming up in a couple of minutes. |
Thanks a lot, looking forward to the fix. |
Hi everyone,
Recently I decided to upgrade flask-socketio in my app and encountered an error that I thought was originally related to some old dependencies. However, after I managed to replicate it using an example app I started thinking that it might be a package error.
I use ubuntu 14.04 and here are the packages I have in my venv:
Here is app.py:
Here is my test case in test/test_socketio.py
I use unittest discover to run tests, but I think you might also need
__init__.py
in test folder.The text was updated successfully, but these errors were encountered: