ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pytest-httpbin / default.nix
blobc83724fa8036e2332d26c4ac5da3fda3b3a9f2c0
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , httpbin
5 , pytest
6 , pytestCheckHook
7 , pythonOlder
8 , requests
9 , six
12 buildPythonPackage rec {
13   pname = "pytest-httpbin";
14   version = "1.0.2";
15   format = "setuptools";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "kevin1024";
21     repo = "pytest-httpbin";
22     rev = "v${version}";
23     hash = "sha256-S4ThQx4H3UlKhunJo35esPClZiEn7gX/Qwo4kE1QMTI=";
24   };
26   buildInputs = [
27     pytest
28   ];
30   propagatedBuildInputs = [
31     httpbin
32     six
33   ];
35   preCheck = ''
36     # Remove assertion that doesn't hold for Flask 2.1.0
37     substituteInPlace tests/test_server.py \
38       --replace "assert response.headers['Location'].startswith('https://')" ""
39   '';
41   checkInputs = [
42     pytestCheckHook
43     requests
44   ];
46   pythonImportsCheck = [
47     "pytest_httpbin"
48   ];
50   meta = with lib; {
51     description = "Test your HTTP library against a local copy of httpbin.org";
52     homepage = "https://github.com/kevin1024/pytest-httpbin";
53     license = licenses.mit;
54     maintainers = with maintainers; [ ];
55   };