at 25.11-pre 61 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 click, 5 faker, 6 fetchFromGitHub, 7 flask, 8 gunicorn, 9 pyopenssl, 10 pytestCheckHook, 11 pythonAtLeast, 12 pythonOlder, 13 requests, 14 setuptools-scm, 15 standard-telnetlib, 16}: 17 18buildPythonPackage rec { 19 pname = "threat9-test-bed"; 20 version = "0.6.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = "threat9"; 27 repo = pname; 28 rev = "v${version}"; 29 hash = "sha256-0YSjMf2gDdrvkDaT77iwfCkiDDXKHnZyI8d7JmBSuCg="; 30 }; 31 32 build-system = [ setuptools-scm ]; 33 34 dependencies = [ 35 click 36 faker 37 flask 38 gunicorn 39 pyopenssl 40 requests 41 ] ++ lib.optionals (pythonAtLeast "3.13") [ standard-telnetlib ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 pythonImportsCheck = [ "threat9_test_bed" ]; 46 47 disabledTests = [ 48 # Assertion issue with the response codes 49 "test_http_service_mock" 50 "tests_http_service_mock" 51 "test_http_service_mock_random_port" 52 ]; 53 54 meta = with lib; { 55 description = "Module for adding unittests.mock as view functions"; 56 homepage = "https://github.com/threat9/threat9-test-bed"; 57 license = licenses.bsd3; 58 maintainers = with maintainers; [ fab ]; 59 mainProgram = "test-bed"; 60 }; 61}