python3Packages.responses: enable tests and add meta

This commit is contained in:
Fabian Affolter 2021-08-11 12:16:04 +02:00
parent cd6aea6a92
commit 8141e2f2d5

View file

@ -1,5 +1,15 @@
{ buildPythonPackage, fetchPypi
, cookies, mock, requests, six }:
{ lib
, buildPythonPackage
, cookies
, fetchPypi
, mock
, pytest-localserver
, pytestCheckHook
, pythonOlder
, requests
, six
, urllib3
}:
buildPythonPackage rec {
pname = "responses";
@ -10,7 +20,27 @@ buildPythonPackage rec {
sha256 = "sha256-lHZ3XYVtPCSuZgu+vin7bXidStFqzXI++/tu4gmQuJk=";
};
propagatedBuildInputs = [ cookies mock requests six ];
propagatedBuildInputs = [
requests
urllib3
six
] ++ lib.optionals (pythonOlder "3.4") [
cookies
] ++ lib.optionals (pythonOlder "3.3") [
mock
];
doCheck = false;
checkInputs = [
pytest-localserver
pytestCheckHook
];
pythonImportsCheck = [ "responses" ];
meta = with lib; {
description = "Python module for mocking out the requests Python library";
homepage = "https://github.com/getsentry/responses";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}