Files
nixpkgs/pkgs/development/python-modules/pook/default.nix
T

69 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
falcon,
fetchFromGitHub,
furl,
hatchling,
jsonschema,
pytest-asyncio,
pytest-httpbin,
pytest-pook,
pytestCheckHook,
xmltodict,
}:
buildPythonPackage rec {
pname = "pook";
version = "2.1.6";
pyproject = true;
src = fetchFromGitHub {
owner = "h2non";
repo = "pook";
tag = "v${version}";
hash = "sha256-pStAlxhyZ1eDER17yLYc1r+kGpEZFW+mi0y3nrPA1CQ=";
};
build-system = [ hatchling ];
dependencies = [
furl
jsonschema
xmltodict
];
nativeCheckInputs = [
falcon
pytest-asyncio
pytest-httpbin
pytest-pook
pytestCheckHook
];
pythonImportsCheck = [ "pook" ];
disabledTests = [
# furl compat issue
"test_headers_not_matching"
];
disabledTestPaths = [
# Don't test integrations
"tests/integration/"
# Tests require network access
"tests/unit/interceptors/"
];
# Tests use sockets
__darwinAllowLocalNetworking = true;
meta = {
description = "HTTP traffic mocking and testing";
homepage = "https://github.com/h2non/pook";
changelog = "https://github.com/h2non/pook/blob/v${src.tag}/History.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}