From 4775c308fa481128d971fd9f15313ebaf6aeb76c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 3 Apr 2022 23:20:31 +0200 Subject: [PATCH] pytest-httpbin: drop assertion that doesn't hold anymore In Flask 2.1.0 Location headers were made relative and alot of packages still assume absolute values. That breaks the assertion, so we drop it. --- pkgs/development/python-modules/pytest-httpbin/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/pytest-httpbin/default.nix b/pkgs/development/python-modules/pytest-httpbin/default.nix index 0069eb6f179e..7dc70c49280f 100644 --- a/pkgs/development/python-modules/pytest-httpbin/default.nix +++ b/pkgs/development/python-modules/pytest-httpbin/default.nix @@ -28,6 +28,12 @@ buildPythonPackage rec { six ]; + preCheck = '' + # Remove assertion that doesn't hold for Flask 2.1.0 + substituteInPlace tests/test_server.py \ + --replace "assert response.headers['Location'].startswith('https://')" "" + ''; + checkInputs = [ pytestCheckHook requests