How to use the gdbgui.backend.app function in gdbgui

To help you get started, we’ve selected a few gdbgui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cs01 / gdbgui / tests / test_app.py View on Github external
def test_connect(self):
        app = backend.app
        socketio = SocketIO()

        @socketio.on("connect")
        def on_connect():
            send({"connected": "foo"}, json=True)

        socketio.init_app(app, cookie="foo")
        client = socketio.test_client(app)
        received = client.get_received()
        self.assertEqual(len(received), 1)
        self.assertEqual(received[0]["args"], {"connected": "foo"})