Skip to content

Commit

Permalink
python312Packages.flask-security: fix test (#367863)
Browse files Browse the repository at this point in the history
  • Loading branch information
gador authored Dec 25, 2024
2 parents 72a8515 + 2bdbb27 commit b9095aa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/flask-security/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ buildPythonPackage rec {
hash = "sha256-RGRwgrDFe+0v8NYyajMikdoi1DQf1I+B5y8KJyF+cZs=";
};

patches = [
# https://github.com/pallets-eco/flask-security/pull/1040
./fix_test_basic.patch
];

build-system = [ flit-core ];

# flask-login>=0.6.2 not satisfied by version 0.7.0.dev0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/tests/test_basic.py b/tests/test_basic.py
index d52be429..09dfa8e4 100644
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -157,6 +157,8 @@ def test_authenticate_with_subdomain_next(app, client, get_message):

@pytest.mark.settings(subdomain="auth")
def test_authenticate_with_root_domain_next(app, client, get_message):
+ # As of Flask 3.1 this must be explicitly set.
+ app.subdomain_matching = True
app.config["SERVER_NAME"] = "lp.com"
app.config["SECURITY_REDIRECT_ALLOW_SUBDOMAINS"] = True
data = dict(email="[email protected]", password="password")

0 comments on commit b9095aa

Please sign in to comment.