python3Packages.pytest-localserver: fix build

All package tests rely on networking which breaks sandboxed builds.
Fall back to pythonImportsCheck instead.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
This commit is contained in:
Sirio Balmelli 2020-07-21 03:24:42 +02:00 committed by Frederik Rietdijk
parent 70f6c1a9ba
commit 163e7a0663

View file

@ -1,9 +1,6 @@
{ buildPythonPackage
, lib
, fetchPypi
, requests
, pytest
, six
, werkzeug
}:
@ -17,16 +14,16 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [ werkzeug ];
checkInputs = [ pytest six requests ];
checkPhase = ''
pytest
'';
# all tests access network: does not work in sandbox
doCheck = false;
pythonImportsCheck = [ "pytest_localserver" ];
meta = {
meta = with lib; {
description = "Plugin for the pytest testing framework to test server connections locally";
homepage = "https://pypi.python.org/pypi/pytest-localserver";
license = lib.licenses.mit;
license = licenses.mit;
maintainers = with maintainers; [ siriobalmelli ];
};
}