at 23.11-beta 3.9 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5 6# build-system 7, setuptools 8 9# dependencies 10, boto3 11, botocore 12, cryptography 13, jinja2 14, python-dateutil 15, requests 16, responses 17, werkzeug 18, xmltodict 19 20# optional-dependencies 21, aws-xray-sdk 22, cfn-lint 23, docker 24, ecdsa 25, flask 26, flask-cors 27, graphql-core 28, jsondiff 29, multipart 30, openapi-spec-validator 31, py-partiql-parser 32, pyparsing 33, python-jose 34, pyyaml 35, sshpubkeys 36 37# tests 38, freezegun 39, pytestCheckHook 40, pytest-xdist 41}: 42 43buildPythonPackage rec { 44 pname = "moto"; 45 version = "4.2.6"; 46 pyproject = true; 47 48 disabled = pythonOlder "3.6"; 49 50 src = fetchPypi { 51 inherit pname version; 52 hash = "sha256-zgpV1+dWxZpaQ5LHCXqlylPgCqLdP3AACTNWvhXnrvk="; 53 }; 54 55 nativeBuildInputs = [ 56 setuptools 57 ]; 58 59 propagatedBuildInputs = [ 60 boto3 61 botocore 62 cryptography 63 requests 64 xmltodict 65 werkzeug 66 python-dateutil 67 responses 68 jinja2 69 ]; 70 71 passthru.optional-dependencies = { 72 # non-exhaustive list of extras, that was cobbled together for testing 73 all = [ 74 aws-xray-sdk 75 cfn-lint 76 docker 77 ecdsa 78 flask 79 flask-cors 80 graphql-core 81 jsondiff 82 multipart 83 openapi-spec-validator 84 py-partiql-parser 85 pyparsing 86 python-jose 87 pyyaml 88 setuptools 89 sshpubkeys 90 ] ++ python-jose.optional-dependencies.cryptography; 91 }; 92 93 __darwinAllowLocalNetworking = true; 94 95 nativeCheckInputs = [ 96 freezegun 97 pytestCheckHook 98 pytest-xdist 99 ] ++ passthru.optional-dependencies.all; 100 101 pytestFlagsArray = [ 102 "-m" "'not network and not requires_docker'" 103 104 # Fails at local name resolution 105 "--deselect=tests/test_s3/test_multiple_accounts_server.py::TestAccountIdResolution::test_with_custom_request_header" 106 "--deselect=tests/test_s3/test_server.py::test_s3_server_post_cors_multiple_origins" 107 108 # Fails at resolving google.com 109 "--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_http_destination" 110 "--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_batch_http_destination" 111 112 # Download recordings returns faulty JSON 113 "--deselect=tests/test_moto_api/recorder/test_recorder.py::TestRecorder::test_ec2_instance_creation_recording_on" 114 "--deselect=tests/test_moto_api/recorder/test_recorder.py::TestRecorder::test_ec2_instance_creation__recording_off" 115 116 # Connection Reset by Peer, when connecting to localhost:5678 117 "--deselect=tests/test_moto_api/recorder/test_recorder.py::TestRecorder::test_replay" 118 119 # Requires docker, but isn't marked 120 # https://github.com/getmoto/moto/pull/6938 121 "--deselect=tests/test_awslambda/test_lambda_layers_invoked.py::test_invoke_local_lambda_layers" 122 123 # Racy, expects two timestamp two differ 124 # https://github.com/getmoto/moto/issues/6946 125 "--deselect=tests/test_databrew/test_databrew_recipes.py::test_publish_recipe" 126 ]; 127 128 disabledTestPaths = [ 129 # Requires pytest-ordering, which is unmaintained 130 # https://github.com/getmoto/moto/issues/6937 131 # botocore.exceptions.NoCredentialsError: Unable to locate credentials 132 "tests/test_dynamodb/test_dynamodb_statements.py" 133 "tests/test_lakeformation/test_resource_tags_integration.py" 134 "tests/test_redshiftdata/test_redshiftdata.py" 135 "tests/test_s3/test_s3_file_handles.py" 136 "tests/test_s3/test_s3.py" 137 "tests/test_s3/test_s3_select.py" 138 139 # Tries to access the network 140 "tests/test_batch/test_batch_jobs.py" 141 142 # Threading tests regularly blocks test execution 143 "tests/test_utilities/test_threaded_server.py" 144 "tests/test_s3/test_s3_bucket_policy.py" 145 ]; 146 147 meta = with lib; { 148 description = "Allows your tests to easily mock out AWS Services"; 149 homepage = "https://github.com/spulec/moto"; 150 changelog = "https://github.com/getmoto/moto/blob/${version}/CHANGELOG.md"; 151 license = licenses.asl20; 152 maintainers = [ ]; 153 }; 154}