From c7975509573a75e579a09bf6460a8a7e98217ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 27 Apr 2017 08:24:55 +0200 Subject: [PATCH] pythonPackages.pytest-httpbin: correct `meta`; tests --- .../python-modules/pytest-httpbin/default.nix | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/pytest-httpbin/default.nix b/pkgs/development/python-modules/pytest-httpbin/default.nix index 8818fd04fa1..a31c9ba35bb 100644 --- a/pkgs/development/python-modules/pytest-httpbin/default.nix +++ b/pkgs/development/python-modules/pytest-httpbin/default.nix @@ -1,29 +1,35 @@ { buildPythonPackage , lib -, fetchurl -, pythonPackages +, fetchFromGitHub +, pytest +, flask +, decorator +, httpbin +, six +, requests2 }: -let - pname = "pytest-httpbin"; +buildPythonPackage rec { + name = "pytest-httpbin-${version}"; version = "0.2.3"; -in buildPythonPackage rec { - name = "${pname}-${version}"; - src = fetchurl { - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; - sha256 = "1y0v2v7xpzpyd4djwp7ad8ifnlxp8r1y6dfbxg5ckzvllkgridn5"; + src = fetchFromGitHub { + owner = "kevin1024"; + repo = "pytest-httpbin"; + rev = "v${version}"; + sha256 = "0j3n12jjy8cm0va8859wqra6abfyajrgh2qj8bhcngf3a72zl9ks"; }; - buildInputs = with pythonPackages; [ pytest httpbin ]; - propagatedBuildInputs = []; + checkPhase = '' + py.test -k "not test_chunked_encoding" + ''; - # Tests in neither the archive nor the repo - doCheck = false; + buildInputs = [ pytest ]; + propagatedBuildInputs = [ flask decorator httpbin six requests2 ]; meta = { - description = "py.test plugin to store test expectations and mark tests based on them"; - homepage = https://github.com/gsnedders/pytest-expect; + description = "Easily test your HTTP library against a local copy of httpbin.org"; + homepage = https://github.com/kevin1024/pytest-httpbin; license = lib.licenses.mit; }; }