about summary refs log tree commit diff
path: root/pkgs/development/python-modules/moto/default.nix
blob: 7f3251a6cc228a00922c9652b39392927fa8f07c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder

# runtime
, aws-xray-sdk
, boto3
, botocore
, cfn-lint
, cryptography
, docker
, flask
, flask-cors
, graphql-core
, idna
, jinja2
, jsondiff
, python-dateutil
, python-jose
, pytz
, pyyaml
, requests
, responses
, sshpubkeys
, werkzeug
, xmltodict

# tests
, freezegun
, pytestCheckHook
, pytest-xdist
, sure
}:

buildPythonPackage rec {
  pname = "moto";
  version = "3.1.3";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-+kgVlfVhHZ/r2vCg0Skwe1433mh2w30DXO7+Rs59isA=";
  };

  propagatedBuildInputs = [
    aws-xray-sdk
    boto3
    botocore
    cfn-lint
    cryptography
    docker
    flask
    flask-cors
    graphql-core
    idna
    jinja2
    jsondiff
    python-dateutil
    python-jose
    pytz
    pyyaml
    requests
    responses
    sshpubkeys
    werkzeug
    xmltodict
  ];

  checkInputs = [
    freezegun
    pytestCheckHook
    sure
  ];

  pytestFlagsArray = [
    # Disable tests that try to access the network
    "--deselect=tests/test_cloudformation/test_cloudformation_custom_resources.py::test_create_custom_lambda_resource__verify_cfnresponse_failed"
    "--deselect=tests/test_cloudformation/test_server.py::test_cloudformation_server_get"
    "--deselect=tests/test_core/test_decorator_calls.py::test_context_manager"
    "--deselect=tests/test_core/test_decorator_calls.py::test_decorator_start_and_stop"
    "--deselect=tests/test_core/test_request_mocking.py::test_passthrough_requests"
    "--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_batch_http_destination"
    "--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_http_destination"
    "--deselect=tests/test_logs/test_integration.py::test_put_subscription_filter_with_lambda"
    "--deselect=tests/test_sqs/test_integration.py::test_invoke_function_from_sqs_exception"
    "--deselect=tests/test_sqs/test_sqs_integration.py::test_invoke_function_from_sqs_exception"
    "--deselect=tests/test_stepfunctions/test_stepfunctions.py::test_state_machine_creation_fails_with_invalid_names"
    "--deselect=tests/test_stepfunctions/test_stepfunctions.py::test_state_machine_list_executions_with_pagination"
    "--deselect=tests/test_iotdata/test_iotdata.py::test_update"
    "--deselect=tests/test_iotdata/test_iotdata.py::test_basic"
    "--deselect=tests/test_iotdata/test_iotdata.py::test_delete_field_from_device_shadow"
    "--deselect=tests/test_iotdata/test_iotdata.py::test_publish"
    "--deselect=tests/test_s3/test_server.py::test_s3_server_bucket_versioning"

    # json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    "--deselect=tests/test_cloudformation/test_cloudformation_stack_integration.py::test_lambda_function"

    # AssertionError: CloudWatch log event was not found.
    "--deselect=tests/test_logs/test_integration.py::test_subscription_filter_applies_to_new_streams"

    # KeyError: 'global'
    "--deselect=tests/test_iotdata/test_server.py::test_iotdata_list"
    "--deselect=tests/test_iotdata/test_server.py::test_publish"

    # Blocks test execution
    "--deselect=tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_load_data_from_inmemory_client"
  ];

  disabledTestPaths = [
    # xml.parsers.expat.ExpatError: out of memory: line 1, column 0
    "tests/test_sts/test_sts.py"
    # botocore.exceptions.NoCredentialsError: Unable to locate credentials
    "tests/test_redshiftdata/test_redshiftdata.py"
    # Tries to access the network
    "tests/test_appsync/test_appsync_schema.py"
    "tests/test_awslambda/test_lambda_eventsourcemapping.py"
    "tests/test_awslambda/test_lambda_invoke.py"
    "tests/test_batch/test_batch_jobs.py"
  ];

  disabledTests = [
    # only appears in aarch64 currently, but best to be safe
    "test_state_machine_list_executions_with_filter"
  ];

  meta = with lib; {
    description = "Allows your tests to easily mock out AWS Services";
    homepage = "https://github.com/spulec/moto";
    license = licenses.asl20;
    maintainers = [ ];
  };
}