Skip to content

Commit b9095aa

Browse files
authored
python312Packages.flask-security: fix test (NixOS#367863)
2 parents 72a8515 + 2bdbb27 commit b9095aa

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

pkgs/development/python-modules/flask-security/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ buildPythonPackage rec {
6464
hash = "sha256-RGRwgrDFe+0v8NYyajMikdoi1DQf1I+B5y8KJyF+cZs=";
6565
};
6666

67+
patches = [
68+
# https://github.com/pallets-eco/flask-security/pull/1040
69+
./fix_test_basic.patch
70+
];
71+
6772
build-system = [ flit-core ];
6873

6974
# flask-login>=0.6.2 not satisfied by version 0.7.0.dev0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/tests/test_basic.py b/tests/test_basic.py
2+
index d52be429..09dfa8e4 100644
3+
--- a/tests/test_basic.py
4+
+++ b/tests/test_basic.py
5+
@@ -157,6 +157,8 @@ def test_authenticate_with_subdomain_next(app, client, get_message):
6+
7+
@pytest.mark.settings(subdomain="auth")
8+
def test_authenticate_with_root_domain_next(app, client, get_message):
9+
+ # As of Flask 3.1 this must be explicitly set.
10+
+ app.subdomain_matching = True
11+
app.config["SERVER_NAME"] = "lp.com"
12+
app.config["SECURITY_REDIRECT_ALLOW_SUBDOMAINS"] = True
13+
data = dict(email="[email protected]", password="password")

0 commit comments

Comments
 (0)