1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 fetchPypi,
6 fetchpatch,
7 pastedeploy,
8 pyquery,
9 pytestCheckHook,
10 pythonOlder,
11 six,
12 waitress,
13 webob,
14 wsgiproxy2,
15}:
16
17buildPythonPackage rec {
18 pname = "webtest";
19 version = "3.0.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.6";
23
24 src = fetchPypi {
25 pname = "WebTest";
26 inherit version;
27 hash = "sha256-VL2WlyWDjZhhqfon+Nlx950nXZSuJV9cUB9Tu22ZKes=";
28 };
29
30 patches = [
31 (fetchpatch {
32 # Replace deprecated unittest aliases for Python 3.12
33 name = "webtest-python312-compat.patch";
34 url = "https://github.com/Pylons/webtest/commit/d82ec5bd2cf3c7109a1d49ad9fa802ae1eae1763.patch";
35 hash = "sha256-hSwxAxAI3Eo28I8S+r2k/hFG8TlzrVYup3MuTsE+xXk=";
36 })
37 ];
38
39 propagatedBuildInputs = [
40 beautifulsoup4
41 six
42 waitress
43 webob
44 ];
45
46 nativeCheckInputs = [
47 pastedeploy
48 pyquery
49 pytestCheckHook
50 wsgiproxy2
51 ];
52
53 __darwinAllowLocalNetworking = true;
54
55 pythonImportsCheck = [ "webtest" ];
56
57 meta = with lib; {
58 description = "Helper to test WSGI applications";
59 homepage = "https://webtest.readthedocs.org/";
60 license = licenses.mit;
61 maintainers = with maintainers; [ fab ];
62 };
63}