tests: remove pytest-flask dependency

This commit is contained in:
Éloi Rivard 2023-12-14 16:28:46 +01:00
parent 02a7e84833
commit 3b46d6af61
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
3 changed files with 5 additions and 23 deletions

23
poetry.lock generated
View file

@ -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"

View file

@ -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"

View file

@ -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