# -*- coding: utf-8 -*-
import importlib

from homehub_backend.app import create_app


async def greet(request, who, how='Hello,'):
    return f'{how} {who}!'


async def fial(request):
    raise RuntimeError('FIAL')


def create_testing_app(loop=None):
    app = create_app(loop=None)

    importlib.reload(app['SETTINGS'])

    return app
