summary refs log tree commit diff
path: root/pkgs/development/python-modules/aioresponses/default.nix
blob: 446bb9e637916da66ad41788f8e9e9f3207f41c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, pbr
, aiohttp
, ddt
, asynctest
, pytest
}:

buildPythonPackage rec {
  pname = "aioresponses";
  version = "0.6.2";
  disabled = pythonOlder "3.5";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0srqbxxxffi3idqd161n5b90xyqy9gibigxxmvqag3nxab5vw1j6";
  };

  nativeBuildInputs = [
    pbr
  ];

  propagatedBuildInputs = [
    aiohttp
  ];

  checkInputs = [
    asynctest
    ddt
    pytest
  ];

  # Skip a test which makes requests to httpbin.org
  checkPhase = ''
    pytest -k "not test_address_as_instance_of_url_combined_with_pass_through"
  '';

  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 ];
  };
}