Loading pkgs/development/python-modules/splinter/default.nix +9 −9 Original line number Diff line number Diff line { lib, buildPythonPackage, pythonOlder, fetchFromGitHub, setuptools, urllib3, Loading @@ -17,9 +16,6 @@ buildPythonPackage rec { pname = "splinter"; version = "0.21.0"; disabled = pythonOlder "3.8"; pyproject = true; src = fetchFromGitHub { Loading @@ -29,9 +25,13 @@ buildPythonPackage rec { hash = "sha256-PGGql8yI1YosoUBAyDoI/8k7s4sVYnXEV7eow3GHH88="; }; nativeBuildInputs = [ setuptools ]; patches = [ ./lxml-6.patch ]; build-system = [ setuptools ]; propagatedBuildInputs = [ urllib3 ]; dependencies = [ urllib3 ]; optional-dependencies = { "zope.testbrowser" = [ Loading Loading @@ -84,11 +84,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "splinter" ]; meta = with lib; { meta = { changelog = "https://splinter.readthedocs.io/en/latest/news.html"; description = "Browser abstraction for web acceptance testing"; homepage = "https://github.com/cobrateam/splinter"; license = licenses.bsd3; maintainers = with maintainers; [ dotlambda ]; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ dotlambda ]; }; } pkgs/development/python-modules/splinter/lxml-6.patch 0 → 100644 +42 −0 Original line number Diff line number Diff line diff --git a/tests/fake_django/urls.py b/tests/fake_django/urls.py index 2ab75ff..bd736ab 100644 --- a/tests/fake_django/urls.py +++ b/tests/fake_django/urls.py @@ -52,7 +52,8 @@ def post_form(request): def request_headers(request): - body = "\n".join(f"{key}: {value}" for key, value in request.META.items()) + headers = "\n".join(f"{key}: {value}" for key, value in request.META.items()) + body = f"<html><body>{headers}</body></html>" return HttpResponse(body) @@ -67,7 +68,7 @@ def upload_file(request): def foo(request): - return HttpResponse("BAR!") + return HttpResponse("<html><body>BAR!</body></html>") def query_string(request): diff --git a/tests/fake_webapp.py b/tests/fake_webapp.py index ccd5bab..efc31c5 100644 --- a/tests/fake_webapp.py +++ b/tests/fake_webapp.py @@ -119,12 +119,12 @@ def upload_file(): @app.route("/headers", methods=["GET"]) def request_headers(): - return str(request.headers) + return f"<html><body>{request.headers}</body></html>" @app.route("/foo") def foo(): - return "BAR!" + return "<html><body>BAR!</body></html>" @app.route("/query", methods=["GET"]) Loading
pkgs/development/python-modules/splinter/default.nix +9 −9 Original line number Diff line number Diff line { lib, buildPythonPackage, pythonOlder, fetchFromGitHub, setuptools, urllib3, Loading @@ -17,9 +16,6 @@ buildPythonPackage rec { pname = "splinter"; version = "0.21.0"; disabled = pythonOlder "3.8"; pyproject = true; src = fetchFromGitHub { Loading @@ -29,9 +25,13 @@ buildPythonPackage rec { hash = "sha256-PGGql8yI1YosoUBAyDoI/8k7s4sVYnXEV7eow3GHH88="; }; nativeBuildInputs = [ setuptools ]; patches = [ ./lxml-6.patch ]; build-system = [ setuptools ]; propagatedBuildInputs = [ urllib3 ]; dependencies = [ urllib3 ]; optional-dependencies = { "zope.testbrowser" = [ Loading Loading @@ -84,11 +84,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "splinter" ]; meta = with lib; { meta = { changelog = "https://splinter.readthedocs.io/en/latest/news.html"; description = "Browser abstraction for web acceptance testing"; homepage = "https://github.com/cobrateam/splinter"; license = licenses.bsd3; maintainers = with maintainers; [ dotlambda ]; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ dotlambda ]; }; }
pkgs/development/python-modules/splinter/lxml-6.patch 0 → 100644 +42 −0 Original line number Diff line number Diff line diff --git a/tests/fake_django/urls.py b/tests/fake_django/urls.py index 2ab75ff..bd736ab 100644 --- a/tests/fake_django/urls.py +++ b/tests/fake_django/urls.py @@ -52,7 +52,8 @@ def post_form(request): def request_headers(request): - body = "\n".join(f"{key}: {value}" for key, value in request.META.items()) + headers = "\n".join(f"{key}: {value}" for key, value in request.META.items()) + body = f"<html><body>{headers}</body></html>" return HttpResponse(body) @@ -67,7 +68,7 @@ def upload_file(request): def foo(request): - return HttpResponse("BAR!") + return HttpResponse("<html><body>BAR!</body></html>") def query_string(request): diff --git a/tests/fake_webapp.py b/tests/fake_webapp.py index ccd5bab..efc31c5 100644 --- a/tests/fake_webapp.py +++ b/tests/fake_webapp.py @@ -119,12 +119,12 @@ def upload_file(): @app.route("/headers", methods=["GET"]) def request_headers(): - return str(request.headers) + return f"<html><body>{request.headers}</body></html>" @app.route("/foo") def foo(): - return "BAR!" + return "<html><body>BAR!</body></html>" @app.route("/query", methods=["GET"])