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