1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pytestCheckHook
6, pythonOlder
7, requests
8, toml
9, werkzeug
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-httpserver";
14 version = "1.0.7";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "csernazs";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 hash = "sha256-bjysG+7niSUBl8YMWR8pr7oOz9GDbSfq3PeloYBkq3s=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 propagatedBuildInputs = [
31 werkzeug
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 requests
37 toml
38 ];
39
40 __darwinAllowLocalNetworking = true;
41
42 disabledTests = [
43 "test_wait_raise_assertion_false" # racy
44 ];
45
46 pythonImportsCheck = [
47 "pytest_httpserver"
48 ];
49
50 meta = with lib; {
51 description = "HTTP server for pytest to test HTTP clients";
52 homepage = "https://www.github.com/csernazs/pytest-httpserver";
53 changelog = "https://github.com/csernazs/pytest-httpserver/blob/${version}/CHANGES.rst";
54 license = with licenses; [ mit ];
55 maintainers = with maintainers; [ fab ];
56 };
57}