about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/httpretty/default.nix
blob: ecde40353f3164e7a372f97569de0d140880d8ce (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
{ lib
, buildPythonPackage
, fetchPypi
, sure
, six
, pytest
, freezegun
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "httpretty";
  version = "1.1.4";
  format = "setuptools";

  # drop this for version > 0.9.7
  # Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394
  doCheck = lib.versionAtLeast version "0.9.8";

  src = fetchPypi {
    inherit pname version;
    sha256 = "20de0e5dd5a18292d36d928cc3d6e52f8b2ac73daec40d41eb62dee154933b68";
  };

  propagatedBuildInputs = [ six ];

  nativeCheckInputs = [
    sure
    freezegun
    pytestCheckHook
  ];

  disabledTestPaths = [
    "tests/bugfixes"
    "tests/functional"
    "tests/pyopenssl"
  ];

  __darwinAllowLocalNetworking = true;

  meta = with lib; {
    homepage = "https://httpretty.readthedocs.org/";
    description = "HTTP client request mocking tool";
    license = licenses.mit;
  };
}