def run(port, debug): app = App() try: app.run() except KeyboardInterrupt: app.stop()
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()
from bottery.app import App app = App() app.run()
def run(port, debug): app = App() app.run()