2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, sure
|
|
|
|
, six
|
2020-06-15 15:56:04 +00:00
|
|
|
, pytest
|
|
|
|
, freezegun
|
2022-08-12 12:06:08 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpretty";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "1.1.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# drop this for version > 0.9.7
|
|
|
|
# Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394
|
2021-02-05 17:12:51 +00:00
|
|
|
doCheck = lib.versionAtLeast version "0.9.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "20de0e5dd5a18292d36d928cc3d6e52f8b2ac73daec40d41eb62dee154933b68";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
sure
|
|
|
|
freezegun
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/bugfixes"
|
|
|
|
"tests/functional"
|
|
|
|
"tests/pyopenssl"
|
|
|
|
];
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://httpretty.readthedocs.org/";
|
|
|
|
description = "HTTP client request mocking tool";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|