nixpkgs/pkgs/development/python-modules/moto/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

166 lines
5.5 KiB
Nix
Raw Normal View History

2022-03-02 21:42:06 +00:00
{ lib
, stdenv
2022-03-02 21:42:06 +00:00
, buildPythonPackage
, fetchPypi
, pythonOlder
2023-02-27 01:14:31 +00:00
# build
, setuptools
2022-03-02 21:42:06 +00:00
# runtime
2019-07-23 23:00:32 +00:00
, aws-xray-sdk
, boto3
, botocore
, cfn-lint
2022-03-02 21:42:06 +00:00
, cryptography
2019-07-23 23:00:32 +00:00
, docker
, flask
2022-02-07 03:20:14 +00:00
, flask-cors
2022-03-02 21:42:06 +00:00
, graphql-core
, idna
2019-07-23 23:00:32 +00:00
, jinja2
, jsondiff
2022-06-03 11:14:04 +00:00
, openapi-spec-validator
2023-02-27 01:14:31 +00:00
, pyparsing
2022-03-02 21:42:06 +00:00
, python-dateutil
2019-07-23 23:00:32 +00:00
, python-jose
2022-03-02 21:42:06 +00:00
, pyyaml
2019-07-23 23:00:32 +00:00
, requests
, responses
, sshpubkeys
, werkzeug
, xmltodict
2022-03-02 21:42:06 +00:00
# tests
, freezegun
2020-12-28 21:06:52 +00:00
, pytestCheckHook
2022-02-07 03:20:14 +00:00
, pytest-xdist
2022-03-02 21:42:06 +00:00
, sure
2019-07-23 23:00:32 +00:00
}:
2017-09-15 13:15:54 +00:00
buildPythonPackage rec {
pname = "moto";
2023-02-27 01:14:31 +00:00
version = "4.1.3";
format = "pyproject";
2022-03-02 21:42:06 +00:00
disabled = pythonOlder "3.6";
2017-12-30 11:24:45 +00:00
2017-09-15 13:15:54 +00:00
src = fetchPypi {
inherit pname version;
2023-02-27 01:14:31 +00:00
hash = "sha256-yCAMyqlEDC6dqgvV4L12inGdtaLILqjXgvDj+gmjxeI=";
2017-09-15 13:15:54 +00:00
};
2023-02-27 01:14:31 +00:00
nativeBuildInputs = [
setuptools
];
2017-09-15 13:15:54 +00:00
propagatedBuildInputs = [
2017-12-30 11:24:45 +00:00
aws-xray-sdk
boto3
2019-07-23 23:00:32 +00:00
botocore
2019-05-01 08:59:56 +00:00
cfn-lint
2022-03-02 21:42:06 +00:00
cryptography
2019-07-23 23:00:32 +00:00
docker
2022-03-02 21:42:06 +00:00
flask
flask-cors
graphql-core
idna
2017-09-15 13:15:54 +00:00
jinja2
2019-07-23 23:00:32 +00:00
jsondiff
2022-06-03 11:14:04 +00:00
openapi-spec-validator
2023-02-27 01:14:31 +00:00
pyparsing
2022-03-02 21:42:06 +00:00
python-dateutil
2018-08-30 17:09:45 +00:00
python-jose
2022-03-02 21:42:06 +00:00
pyyaml
2019-07-23 23:00:32 +00:00
requests
responses
sshpubkeys
werkzeug
xmltodict
2022-03-02 21:42:06 +00:00
];
2017-09-15 13:15:54 +00:00
2023-08-01 07:01:21 +00:00
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
2022-02-07 03:20:14 +00:00
freezegun
2022-03-02 21:42:06 +00:00
pytestCheckHook
2022-02-07 03:20:14 +00:00
sure
];
2017-09-15 13:15:54 +00:00
2020-12-28 21:06:52 +00:00
pytestFlagsArray = [
2022-03-02 21:42:06 +00:00
# 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"
2022-09-14 21:36:12 +00:00
"--deselect=tests/test_s3/test_multiple_accounts_server.py::TestAccountIdResolution::test_with_custom_request_header"
2022-03-02 21:42:06 +00:00
# Disable tests that require docker daemon
2022-06-03 11:14:04 +00:00
"--deselect=tests/test_events/test_events_lambdatriggers_integration.py::test_creating_bucket__invokes_lambda"
"--deselect=tests/test_s3/test_s3_lambda_integration.py::test_objectcreated_put__invokes_lambda"
2022-03-02 21:42:06 +00:00
# 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"
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
"--deselect=tests/test_utilities/test_threaded_server.py::test_threaded_moto_server__different_port"
"--deselect=tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_server_can_handle_multiple_services"
"--deselect=tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_server_is_reachable"
# AssertionError: expected `{0}` to be greater than `{1}`
"--deselect=tests/test_databrew/test_databrew_recipes.py::test_publish_recipe"
2022-03-02 21:42:06 +00:00
];
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"
"tests/test_kinesis/test_kinesis.py"
"tests/test_kinesis/test_kinesis_stream_consumers.py"
2020-12-28 21:06:52 +00:00
];
2017-09-15 13:15:54 +00:00
2020-12-28 21:06:52 +00:00
disabledTests = [
# only appears in aarch64 currently, but best to be safe
"test_state_machine_list_executions_with_filter"
# tests fail with 404 after Werkzeug 2.2 upgrade, see https://github.com/spulec/moto/issues/5341#issuecomment-1206995825
"test_appsync_list_tags_for_resource"
"test_s3_server_post_to_bucket_redirect"
2020-12-28 21:06:52 +00:00
];
2020-02-08 15:53:07 +00:00
2019-07-23 23:00:32 +00:00
meta = with lib; {
2019-07-25 08:47:10 +00:00
description = "Allows your tests to easily mock out AWS Services";
homepage = "https://github.com/spulec/moto";
changelog = "https://github.com/getmoto/moto/blob/${version}/CHANGELOG.md";
2019-07-23 23:00:32 +00:00
license = licenses.asl20;
maintainers = [ ];
};
2017-09-15 13:15:54 +00:00
}