示例#1
0
def run(port, debug):
    app = App()

    try:
        app.run()
    except KeyboardInterrupt:
        app.stop()
示例#2
0
def test_app_run(mocked_asyncio):
    """Should create tasks and run forever"""

    app = App()
    app.run()
    mocked_event_loop = mocked_asyncio.get_event_loop.return_value

    mocked_asyncio.get_event_loop.assert_called_with()
    mocked_event_loop.run_forever.assert_called_with()
示例#3
0
from bottery.app import App


app = App()
app.run()
示例#4
0
文件: cli.py 项目: thaisviana/bottery
def run(port, debug):
    app = App()
    app.run()