diff --git a/pkgs/development/python-modules/httpbin/default.nix b/pkgs/development/python-modules/httpbin/default.nix index ace9a7041e3fa..8359fcf0a096d 100644 --- a/pkgs/development/python-modules/httpbin/default.nix +++ b/pkgs/development/python-modules/httpbin/default.nix @@ -1,33 +1,65 @@ { lib +, brotlipy , buildPythonPackage +, decorator , fetchPypi , flask , flask-limiter -, markupsafe -, decorator , itsdangerous +, markupsafe , raven , six -, brotlipy +, pytestCheckHook }: buildPythonPackage rec { pname = "httpbin"; version = "0.7.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "1yldvf3585zcwj4vxvfm4yr9wwlz3pa2mx2pazqz8x8mr687gcyb"; + hash = "sha256-y7N3kMkVdfTxV1f0KtQdn3KesifV7b6J5OwXVIbbjfo="; }; - propagatedBuildInputs = [ brotlipy flask flask-limiter markupsafe decorator itsdangerous raven six ]; + propagatedBuildInputs = [ + brotlipy + flask + flask-limiter + markupsafe + decorator + itsdangerous + raven + six + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "test_httpbin.py" + ]; + + disabledTests = [ + # Tests seems to be outdated + "test_anything" + "test_get" + "test_redirect_n_equals_to_1" + "test_redirect_n_higher_than_1" + "test_redirect_to_post" + "test_relative_redirect_n_equals_to_1" + "test_relative_redirect_n_higher_than_1" + ]; - # No tests - doCheck = false; + pythonImportsCheck = [ + "httpbin" + ]; meta = with lib; { + description = "HTTP Request and Response Service"; homepage = "https://github.com/kennethreitz/httpbin"; - description = "HTTP Request & Response Service"; license = licenses.mit; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pytest-httpbin/default.nix b/pkgs/development/python-modules/pytest-httpbin/default.nix index 836da1e157ffa..0069eb6f179ec 100644 --- a/pkgs/development/python-modules/pytest-httpbin/default.nix +++ b/pkgs/development/python-modules/pytest-httpbin/default.nix @@ -1,35 +1,46 @@ -{ buildPythonPackage -, lib -, fetchPypi -, pytest +{ lib +, buildPythonPackage +, fetchFromGitHub , httpbin +, pytest +, pytestCheckHook +, requests , six }: buildPythonPackage rec { pname = "pytest-httpbin"; - version = "1.0.0"; + version = "1.0.1"; - src = fetchPypi { - inherit pname version; - sha256 = "0wlvw5qgkax7f0i5ks1562s37h2hdmn5yxnp1rajcc2289zm9knq"; + src = fetchFromGitHub { + owner = "kevin1024"; + repo = "pytest-httpbin"; + rev = "v${version}"; + hash = "sha256-Vngd8Vum96+rdG8Nz1+aHrO6WZjiAz+0CeIovaH8N+s="; }; - checkInputs = [ pytest ]; + buildInputs = [ + pytest + ]; - propagatedBuildInputs = [ httpbin six ]; + propagatedBuildInputs = [ + httpbin + six + ]; - checkPhase = '' - py.test - ''; + checkInputs = [ + pytestCheckHook + requests + ]; - # https://github.com/kevin1024/pytest-httpbin/pull/51 - doCheck = false; + pythonImportsCheck = [ + "pytest_httpbin" + ]; - meta = { - description = "Easily test your HTTP library against a local copy of httpbin.org"; + meta = with lib; { + description = "Test your HTTP library against a local copy of httpbin.org"; homepage = "https://github.com/kevin1024/pytest-httpbin"; - license = lib.licenses.mit; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; } -