2019-03-23 00:03:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pbr
|
|
|
|
, aiohttp
|
|
|
|
, ddt
|
|
|
|
, asynctest
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioresponses";
|
2020-11-04 08:33:41 +00:00
|
|
|
version = "0.7.1";
|
2019-03-23 00:03:13 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-04 08:33:41 +00:00
|
|
|
sha256 = "f65bba2be1e9a4997ee166bc0161a50be0fef7350ad09e6afdb2adccf74dfefe";
|
2019-03-23 00:03:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pbr
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
asynctest
|
|
|
|
ddt
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
# Skip a test which makes requests to httpbin.org
|
|
|
|
checkPhase = ''
|
2020-06-15 19:19:48 +01:00
|
|
|
pytest -k "not (test_address_as_instance_of_url_combined_with_pass_through or test_pass_through_with_origin_params)"
|
2019-03-23 00:03:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A helper to mock/fake web requests in python aiohttp package";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/pnuckowski/aioresponses";
|
2019-03-23 00:03:13 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ rvl ];
|
|
|
|
};
|
|
|
|
}
|