diff --git a/poetry.lock b/poetry.lock index 89a84fcf..4d3bcdca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiosmtpd" @@ -1308,25 +1308,6 @@ files = [ [package.dependencies] pytest-cover = "*" -[[package]] -name = "pytest-flask" -version = "1.3.0" -description = "A set of py.test fixtures to test Flask applications." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-flask-1.3.0.tar.gz", hash = "sha256:58be1c97b21ba3c4d47e0a7691eb41007748506c36bf51004f78df10691fa95e"}, - {file = "pytest_flask-1.3.0-py3-none-any.whl", hash = "sha256:c0e36e6b0fddc3b91c4362661db83fa694d1feb91fa505475be6732b5bc8c253"}, -] - -[package.dependencies] -Flask = "*" -pytest = ">=5.2" -Werkzeug = "*" - -[package.extras] -docs = ["Sphinx", "sphinx-rtd-theme"] - [[package]] name = "pytest-httpserver" version = "1.0.8" @@ -2110,4 +2091,4 @@ sql = ["passlib", "sqlalchemy", "sqlalchemy-json", "sqlalchemy-utils"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "7372f06aa097a115c189932bb0afea25c21cfdbdefd81da5b95fab228da50217" +content-hash = "96297d25c9545e9469b6f3f7d1cab42bc273615710d4c7b1320fd9e2f3549248" diff --git a/pyproject.toml b/pyproject.toml index 06ce39ba..ac82c58b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,6 @@ pre-commit = "*" pyquery = "*" pytest = "*" pytest-coverage = "*" -pytest-flask = "==1.3.0" pytest-httpserver = "*" pytest-lazy-fixture = "==0.6.3" pytest-xdist = "^3.3.1" diff --git a/tests/conftest.py b/tests/conftest.py index 02eb7621..7de5f670 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -123,7 +123,9 @@ def configuration(smtpd): @pytest.fixture def app(configuration, backend): - return create_app(configuration, backend=backend) + app = create_app(configuration, backend=backend) + with app.test_request_context(): + yield app @pytest.fixture