2019-09-05 20:59:38 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, python
|
|
|
|
, mock
|
|
|
|
, purl
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, testrepository
|
|
|
|
, testtools
|
2020-06-11 13:43:01 +01:00
|
|
|
, pytest
|
2019-09-05 20:59:38 +01:00
|
|
|
}:
|
2018-04-02 21:54:24 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-mock";
|
2020-06-06 07:47:30 +01:00
|
|
|
version = "1.8.0";
|
2018-04-02 21:54:24 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 07:47:30 +01:00
|
|
|
sha256 = "e68f46844e4cee9d447150343c9ae875f99fa8037c6dcf5f15bf1fe9ab43d226";
|
2018-04-02 21:54:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's@python@${python.interpreter}@' .testr.conf
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ requests six ];
|
2019-09-05 20:59:38 +01:00
|
|
|
|
2020-06-11 13:43:01 +01:00
|
|
|
checkInputs = [ mock purl testrepository testtools pytest ];
|
2019-09-05 20:59:38 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Mock out responses from the requests package";
|
|
|
|
homepage = "https://requests-mock.readthedocs.io";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
2018-04-02 21:54:24 +01:00
|
|
|
}
|