All Downloads are FREE. Search and download functionalities are using the official Maven repository.

python-aiohttp.conftest.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
import logging
import pytest
import os

import connexion


@pytest.fixture
def client(loop, aiohttp_client):
    logging.getLogger('connexion.operation').setLevel('ERROR')
    options = {
        "swagger_ui": True
        }
    specification_dir = os.path.join(os.path.dirname(__file__), '..',
                                     {{#lambda.forwardslash}}
                                     {{#pythonSrcRoot}}
                                     "{{{.}}}",
                                     {{/pythonSrcRoot}}
                                     {{/lambda.forwardslash}}
                                     '{{packageName}}',
                                     'openapi')
    app = connexion.AioHttpApp(__name__, specification_dir=specification_dir,
                               options=options)
    app.add_api('openapi.yaml', pythonic_params=True,
                pass_context_arg_name='request')
    return loop.run_until_complete(aiohttp_client(app.app))




© 2015 - 2024 Weber Informatics LLC | Privacy Policy