2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2018-10-29 13:41:47 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-10-17 23:51:31 +01:00
|
|
|
, isPy27
|
2018-10-29 13:41:47 +00:00
|
|
|
, nose
|
|
|
|
, webob
|
|
|
|
, six
|
|
|
|
, beautifulsoup4
|
|
|
|
, waitress
|
|
|
|
, mock
|
|
|
|
, pyquery
|
|
|
|
, wsgiproxy2
|
|
|
|
, PasteDeploy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-11-04 10:35:21 +00:00
|
|
|
version = "2.0.32";
|
2018-10-29 13:41:47 +00:00
|
|
|
pname = "webtest";
|
2019-10-17 23:51:31 +01:00
|
|
|
disabled = isPy27; # paste.deploy is not longer a valid import
|
2018-10-29 13:41:47 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2018-12-03 10:30:07 +00:00
|
|
|
pname = "WebTest";
|
|
|
|
inherit version;
|
2018-11-04 10:35:21 +00:00
|
|
|
sha256 = "4221020d502ff414c5fba83c1213985b83219cb1cc611fe58aa4feaf96b5e062";
|
2018-10-29 13:41:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace setup.py --replace "nose<1.3.0" "nose"
|
|
|
|
'';
|
|
|
|
|
2018-12-03 10:30:07 +00:00
|
|
|
propagatedBuildInputs = [ webob six beautifulsoup4 waitress ];
|
|
|
|
|
|
|
|
checkInputs = [ nose mock PasteDeploy wsgiproxy2 pyquery ];
|
2018-10-29 13:41:47 +00:00
|
|
|
|
2019-09-13 23:19:46 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-29 13:41:47 +00:00
|
|
|
description = "Helper to test WSGI applications";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://webtest.readthedocs.org/en/latest/";
|
2018-10-29 13:41:47 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|