diff --git a/examples/miniapps/sanic/README.rst b/examples/miniapps/sanic/README.rst index bbe4859b..7c75b2b3 100644 --- a/examples/miniapps/sanic/README.rst +++ b/examples/miniapps/sanic/README.rst @@ -98,8 +98,8 @@ The output should be something like: .. code-block:: - platform darwin -- Python 3.9, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 - plugins: cov-2.12.1, sanic-1.8.1, anyio-3.3.2 + platform darwin -- Python 3.10.0, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 + plugins: sanic-1.9.1, anyio-3.3.4, cov-3.0.0 collected 3 items giphynavigator/tests.py ... [100%] @@ -109,11 +109,11 @@ The output should be something like: --------------------------------------------------- giphynavigator/__init__.py 0 0 100% giphynavigator/__main__.py 4 4 0% - giphynavigator/application.py 12 0 100% + giphynavigator/application.py 11 0 100% giphynavigator/containers.py 6 0 100% giphynavigator/giphy.py 14 9 36% giphynavigator/handlers.py 11 0 100% giphynavigator/services.py 9 1 89% giphynavigator/tests.py 39 0 100% --------------------------------------------------- - TOTAL 95 14 85% + TOTAL 94 14 85% diff --git a/examples/miniapps/sanic/giphynavigator/application.py b/examples/miniapps/sanic/giphynavigator/application.py index 61625643..2c2d99df 100644 --- a/examples/miniapps/sanic/giphynavigator/application.py +++ b/examples/miniapps/sanic/giphynavigator/application.py @@ -9,7 +9,6 @@ from . import handlers def create_app() -> Sanic: """Create and return Sanic application.""" container = Container() - container.config.from_yaml("config.yml") container.config.giphy.api_key.from_env("GIPHY_API_KEY") container.wire(modules=[handlers]) diff --git a/examples/miniapps/sanic/giphynavigator/containers.py b/examples/miniapps/sanic/giphynavigator/containers.py index 730c162e..62ddc4b1 100644 --- a/examples/miniapps/sanic/giphynavigator/containers.py +++ b/examples/miniapps/sanic/giphynavigator/containers.py @@ -7,7 +7,7 @@ from . import giphy, services class Container(containers.DeclarativeContainer): - config = providers.Configuration() + config = providers.Configuration(yaml_files=["config.yml"]) giphy_client = providers.Factory( giphy.GiphyClient, diff --git a/examples/miniapps/sanic/requirements.txt b/examples/miniapps/sanic/requirements.txt index 5e90f0d3..7e4352ab 100644 --- a/examples/miniapps/sanic/requirements.txt +++ b/examples/miniapps/sanic/requirements.txt @@ -1,5 +1,5 @@ dependency-injector -sanic +sanic<=21.6 aiohttp pyyaml pytest-sanic