2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pbr
|
|
|
|
, aiohttp
|
|
|
|
, ddt
|
|
|
|
, asynctest
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioresponses";
|
2020-06-18 07:06:33 +00:00
|
|
|
version = "0.6.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-18 07:06:33 +00:00
|
|
|
sha256 = "4397ca736238a1ada8c7f47e557dda05e9ecfdd467b9f6b83871efd365af7e9f";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pbr
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
asynctest
|
|
|
|
ddt
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
# Skip a test which makes requests to httpbin.org
|
|
|
|
checkPhase = ''
|
2020-06-15 15:56:04 +00:00
|
|
|
pytest -k "not (test_address_as_instance_of_url_combined_with_pass_through or test_pass_through_with_origin_params)"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A helper to mock/fake web requests in python aiohttp package";
|
|
|
|
homepage = "https://github.com/pnuckowski/aioresponses";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ rvl ];
|
|
|
|
};
|
|
|
|
}
|