Skip to content
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

Test events API #17

Open
jaraco opened this issue Jan 8, 2023 · 2 comments
Open

Test events API #17

jaraco opened this issue Jan 8, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@jaraco
Copy link
Owner

jaraco commented Jan 8, 2023

The Socket IO / events controller currently has poor test coverage:

jaraco/abode/event_controller.py              169     28    83%   61, 65, 69-76, 80-87, 127, 175, 180, 184, 188-200, 204-208
jaraco/abode/socketio.py                      230    135    41%   89, 92, 115-118, 122-125, 130, 140-147, 151-159, 162-185, 188-211, 214-218, 221-227, 230-247, 250-264, 267, 270-282, 285-289, 292-293, 296-308, 311-313, 316-320, 323-325, 328-339, 342-349

As a result, bugs such as those in #14 were allowed to creep into the project.

Today, I did a search and found mocket that looks pretty mature and may enable testing some of the websocket behaviors.

@jaraco jaraco changed the title Need tests for events API Test events API Jan 8, 2023
@jaraco
Copy link
Owner Author

jaraco commented Jan 8, 2023

I was wrong about mocket. It doesn't do websockets, just regular HTTP.

@jaraco
Copy link
Owner Author

jaraco commented Jan 13, 2023

I started looking into creating a mock socketio server in https://github.com/jaraco/jaraco.abode/tree/tests/17-events, but I found it challenging to start up a server and tear it down. Moreover, I don't fully understand the Websocket/EngineIO/SocketIO protocols. I'm unlikely to make progress on this, but I'm eager for any solution. Contributions encouraged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant