1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # build-system
8 pbr,
9 setuptools,
10
11 # dependencies
12 aiohttp,
13
14 # tests
15 ddt,
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "aioresponses";
21 version = "0.7.8";
22 pyproject = true;
23
24 disabled = pythonOlder "3.5";
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-uGHN/l3FjzuK+sewppc9XXsstgjdD2JT0WuO6Or23xE=";
29 };
30
31 nativeBuildInputs = [
32 pbr
33 setuptools
34 ];
35
36 propagatedBuildInputs = [ aiohttp ];
37
38 pythonImportsCheck = [ "aioresponses" ];
39
40 nativeCheckInputs = [
41 ddt
42 pytestCheckHook
43 ];
44
45 disabledTests = [
46 # Skip tests which make requests to httpbin.org
47 "test_address_as_instance_of_url_combined_with_pass_through"
48 "test_pass_through_with_origin_params"
49 "test_pass_through_unmatched_requests"
50 ];
51
52 meta = {
53 description = "Helper to mock/fake web requests in python aiohttp package";
54 homepage = "https://github.com/pnuckowski/aioresponses";
55 license = lib.licenses.mit;
56 };
57}