nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5
6# runtime
7, aws-xray-sdk
8, boto3
9, botocore
10, cfn-lint
11, cryptography
12, docker
13, flask
14, flask-cors
15, graphql-core
16, idna
17, jinja2
18, jsondiff
19, python-dateutil
20, python-jose
21, pytz
22, pyyaml
23, requests
24, responses
25, sshpubkeys
26, werkzeug
27, xmltodict
28
29# tests
30, freezegun
31, pytestCheckHook
32, pytest-xdist
33, sure
34}:
35
36buildPythonPackage rec {
37 pname = "moto";
38 version = "3.1.3";
39 format = "setuptools";
40
41 disabled = pythonOlder "3.6";
42
43 src = fetchPypi {
44 inherit pname version;
45 sha256 = "sha256-+kgVlfVhHZ/r2vCg0Skwe1433mh2w30DXO7+Rs59isA=";
46 };
47
48 propagatedBuildInputs = [
49 aws-xray-sdk
50 boto3
51 botocore
52 cfn-lint
53 cryptography
54 docker
55 flask
56 flask-cors
57 graphql-core
58 idna
59 jinja2
60 jsondiff
61 python-dateutil
62 python-jose
63 pytz
64 pyyaml
65 requests
66 responses
67 sshpubkeys
68 werkzeug
69 xmltodict
70 ];
71
72 checkInputs = [
73 freezegun
74 pytestCheckHook
75 sure
76 ];
77
78 pytestFlagsArray = [
79 # Disable tests that try to access the network
80 "--deselect=tests/test_cloudformation/test_cloudformation_custom_resources.py::test_create_custom_lambda_resource__verify_cfnresponse_failed"
81 "--deselect=tests/test_cloudformation/test_server.py::test_cloudformation_server_get"
82 "--deselect=tests/test_core/test_decorator_calls.py::test_context_manager"
83 "--deselect=tests/test_core/test_decorator_calls.py::test_decorator_start_and_stop"
84 "--deselect=tests/test_core/test_request_mocking.py::test_passthrough_requests"
85 "--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_batch_http_destination"
86 "--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_http_destination"
87 "--deselect=tests/test_logs/test_integration.py::test_put_subscription_filter_with_lambda"
88 "--deselect=tests/test_sqs/test_integration.py::test_invoke_function_from_sqs_exception"
89 "--deselect=tests/test_sqs/test_sqs_integration.py::test_invoke_function_from_sqs_exception"
90 "--deselect=tests/test_stepfunctions/test_stepfunctions.py::test_state_machine_creation_fails_with_invalid_names"
91 "--deselect=tests/test_stepfunctions/test_stepfunctions.py::test_state_machine_list_executions_with_pagination"
92 "--deselect=tests/test_iotdata/test_iotdata.py::test_update"
93 "--deselect=tests/test_iotdata/test_iotdata.py::test_basic"
94 "--deselect=tests/test_iotdata/test_iotdata.py::test_delete_field_from_device_shadow"
95 "--deselect=tests/test_iotdata/test_iotdata.py::test_publish"
96 "--deselect=tests/test_s3/test_server.py::test_s3_server_bucket_versioning"
97
98 # json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
99 "--deselect=tests/test_cloudformation/test_cloudformation_stack_integration.py::test_lambda_function"
100
101 # AssertionError: CloudWatch log event was not found.
102 "--deselect=tests/test_logs/test_integration.py::test_subscription_filter_applies_to_new_streams"
103
104 # KeyError: 'global'
105 "--deselect=tests/test_iotdata/test_server.py::test_iotdata_list"
106 "--deselect=tests/test_iotdata/test_server.py::test_publish"
107
108 # Blocks test execution
109 "--deselect=tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_load_data_from_inmemory_client"
110 ];
111
112 disabledTestPaths = [
113 # xml.parsers.expat.ExpatError: out of memory: line 1, column 0
114 "tests/test_sts/test_sts.py"
115 # botocore.exceptions.NoCredentialsError: Unable to locate credentials
116 "tests/test_redshiftdata/test_redshiftdata.py"
117 # Tries to access the network
118 "tests/test_appsync/test_appsync_schema.py"
119 "tests/test_awslambda/test_lambda_eventsourcemapping.py"
120 "tests/test_awslambda/test_lambda_invoke.py"
121 "tests/test_batch/test_batch_jobs.py"
122 ];
123
124 disabledTests = [
125 # only appears in aarch64 currently, but best to be safe
126 "test_state_machine_list_executions_with_filter"
127 ];
128
129 meta = with lib; {
130 description = "Allows your tests to easily mock out AWS Services";
131 homepage = "https://github.com/spulec/moto";
132 license = licenses.asl20;
133 maintainers = [ ];
134 };
135}