diff --git a/pkgs/development/python-modules/asgi-csrf/default.nix b/pkgs/development/python-modules/asgi-csrf/default.nix index 12c94aee1573..257e7314af9e 100644 --- a/pkgs/development/python-modules/asgi-csrf/default.nix +++ b/pkgs/development/python-modules/asgi-csrf/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, isPy27, fetchFromGitHub, itsdangerous, python-multipart -, pytest, starlette, httpx, pytest-asyncio }: +, pytestCheckHook, starlette, httpx, pytest-asyncio }: buildPythonPackage rec { version = "0.7"; @@ -14,12 +14,23 @@ buildPythonPackage rec { sha256 = "1vf4lh007790836cp3hd6wf8wsgj045dcg0w1cm335p08zz6j4k7"; }; - propagatedBuildInputs = [ itsdangerous python-multipart ]; + propagatedBuildInputs = [ + itsdangerous + python-multipart + ]; + + checkInputs = [ + httpx + pytest-asyncio + pytestCheckHook + starlette + ]; + + # tests fail while importing a private module from httpx + # E ModuleNotFoundError: No module named 'httpx._content_streams' + # https://github.com/simonw/asgi-csrf/issues/18 + doCheck = false; - checkInputs = [ pytest starlette httpx pytest-asyncio ]; - checkPhase = '' - pytest test_asgi_csrf.py - ''; pythonImportsCheck = [ "asgi_csrf" ]; meta = with stdenv.lib; {