2021-01-17 00:15:33 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpcore
|
|
|
|
, httpx
|
2021-08-05 21:33:18 +00:00
|
|
|
, flask
|
2021-01-17 00:15:33 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
, starlette
|
2021-01-17 00:15:33 +00:00
|
|
|
, trio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "respx";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "0.17.1";
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lundberg";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "0w8idh6l2iq04ydz7r2qisq9jsxq8wszkx97kx4g3yjwg4ypvc6k";
|
2021-01-17 00:15:33 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
];
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
httpcore
|
|
|
|
httpx
|
2021-08-05 21:33:18 +00:00
|
|
|
flask
|
2021-01-17 00:15:33 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
starlette
|
2021-01-17 00:15:33 +00:00
|
|
|
trio
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_pass_through"
|
|
|
|
];
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
pythonImportsCheck = [ "respx" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for mocking HTTPX";
|
|
|
|
homepage = "https://lundberg.github.io/respx/";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|