1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 furl,
7 hatchling,
8 jsonschema,
9 pytest-asyncio,
10 pytest-httpbin,
11 pytest7CheckHook,
12 pythonOlder,
13 requests,
14 xmltodict,
15}:
16
17buildPythonPackage rec {
18 pname = "pook";
19 version = "1.4.3";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "h2non";
26 repo = "pook";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-sdfkMvPSlVK7EoDUEuJbiuocOjGJygqiCiftrsjnDhU=";
29 };
30
31 nativeBuildInputs = [ hatchling ];
32
33 propagatedBuildInputs = [
34 aiohttp
35 furl
36 jsonschema
37 requests
38 xmltodict
39 ];
40
41 nativeCheckInputs = [
42 pytest-asyncio
43 pytest-httpbin
44 pytest7CheckHook
45 ];
46
47 pythonImportsCheck = [ "pook" ];
48
49 disabledTestPaths = [
50 # Don't test integrations
51 "tests/integration/"
52 # Tests require network access
53 "tests/unit/interceptors/"
54 ];
55
56 meta = with lib; {
57 description = "HTTP traffic mocking and testing";
58 homepage = "https://github.com/h2non/pook";
59 changelog = "https://github.com/h2non/pook/blob/v${version}/History.rst";
60 license = with licenses; [ mit ];
61 maintainers = with maintainers; [ fab ];
62 };
63}