1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpbin,
6 pytest,
7 pytestCheckHook,
8 pythonOlder,
9 requests,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "pytest-httpbin";
15 version = "2.1.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "kevin1024";
22 repo = "pytest-httpbin";
23 tag = "v${version}";
24 hash = "sha256-gESU1SDpqSQs8GRcGJclWM0WpS4DZicfdtwxk2sQubQ=";
25 };
26
27 build-system = [ setuptools ];
28
29 buildInputs = [ pytest ];
30
31 propagatedBuildInputs = [ httpbin ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 requests
36 ];
37
38 disabledTests = [
39 # incompatible with flask 2.3
40 "test_redirect_location_is_https_for_secure_server"
41 # Timeout on Hydra
42 "test_dont_crash_on_handshake_timeout"
43 ];
44
45 __darwinAllowLocalNetworking = true;
46
47 pythonImportsCheck = [ "pytest_httpbin" ];
48
49 meta = with lib; {
50 description = "Test your HTTP library against a local copy of httpbin.org";
51 homepage = "https://github.com/kevin1024/pytest-httpbin";
52 changelog = "https://github.com/kevin1024/pytest-httpbin/releases/tag/v${version}";
53 license = licenses.mit;
54 maintainers = [ ];
55 };
56}