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";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "0.19.2";
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lundberg";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-uNmSBJOQF4baq8AWzfwj0kinO19jr6Mp9Yblys/WmZs=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|