1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Fri, 20 Jan 2023 20:11:24 +0100
Subject: tests: Revert upstream modification to test_i18n.py
Upstream uses functioninality from Flask-Babel 3.0.0 which will not be
part of bookworm.
Forwarded: Not-Needed
---
tests/test_i18n.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/test_i18n.py b/tests/test_i18n.py
index c7956ec..5a2c3d9 100644
--- a/tests/test_i18n.py
+++ b/tests/test_i18n.py
@@ -32,11 +32,12 @@ def test_i18n(app, client):
except ImportError:
pytest.skip("Flask-Babel must be installed.")
+ babel = Babel(app)
+
+ @babel.localeselector
def get_locale():
return request.accept_languages.best_match(["en", "zh"], "en")
- Babel(app, locale_selector=get_locale)
-
@app.route("/", methods=["POST"])
def index():
form = NameForm()
|