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