示例#1
0
"""
Unit tests

Run from top level directory: ./tests/test_app.py

See more on testing Flask apps: http://flask.pocoo.org/docs/0.11/testing/
"""

import unittest
from gdbgui import backend
import sys
from flask_socketio import send, SocketIO  # type: ignore

PYTHON3 = sys.version_info.major == 3

backend.setup_backend(testing=True)
socketio = backend.socketio


class TestWebsockets(unittest.TestCase):
    @classmethod
    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_connect(self):
        app = backend.app
        socketio = SocketIO()
示例#2
0
 def test_same_port(self):
     backend.setup_backend(testing=True)
示例#3
0
Unit tests

Run from top level directory: ./tests/test_app.py

See more on testing Flask apps: http://flask.pocoo.org/docs/0.11/testing/
"""

import unittest
from gdbgui import backend
import sys
from flask_socketio import send


PYTHON3 = sys.version_info.major == 3

backend.setup_backend(testing=True)
socketio = backend.socketio


@socketio.on('connect')
def on_connect():
    send('connected')


class TestWebsockets(unittest.TestCase):
    @classmethod
    def setUp(self):
        pass

    def tearDown(self):
        pass