1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, pbr
6, aiohttp
7, ddt
8, asynctest
9, pytest
10}:
11
12buildPythonPackage rec {
13 pname = "aioresponses";
14 version = "0.6.2";
15 disabled = pythonOlder "3.5";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "0srqbxxxffi3idqd161n5b90xyqy9gibigxxmvqag3nxab5vw1j6";
20 };
21
22 nativeBuildInputs = [
23 pbr
24 ];
25
26 propagatedBuildInputs = [
27 aiohttp
28 ];
29
30 checkInputs = [
31 asynctest
32 ddt
33 pytest
34 ];
35
36 # Skip a test which makes requests to httpbin.org
37 checkPhase = ''
38 pytest -k "not test_address_as_instance_of_url_combined_with_pass_through"
39 '';
40
41 meta = {
42 description = "A helper to mock/fake web requests in python aiohttp package";
43 homepage = https://github.com/pnuckowski/aioresponses;
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ rvl ];
46 };
47}