

def create_backend_app(service):
    from werkzeug.routing import Map
    backend_app = Flask(__name__)
    backend_app.debug = True
    backend_app.service = service
    backend_app.view_functions = {
        
    }
    backend_app.url_map = Map()
    backend_app.url_map.converters['regex'] = RegexConverter
    backend = BACKENDS[service]
    for (url_path, handler) in backend.flask_paths.items():
        if (handler.__name__ == 'dispatch'):
            endpoint = '{0}.dispatch'.format(handler.__self__.__name__)
        else:
            endpoint = None
        if (endpoint in backend_app.view_functions):
            endpoint += '2'
        backend_app.add_url_rule(url_path, endpoint=endpoint, methods=HTTP_METHODS, view_func=convert_flask_to_httpretty_response(handler))
    backend_app.test_client_class = AWSTestHelper
    return backend_app

dataset/ETHPy150Open spulec/moto/moto/server.py create_backend_app/original