python311Packages.moto: 4.2.6 -> 4.2.10

Add AWS environment variables required for some tests to pass.
This commit is contained in:
Scott Dier 2023-11-25 16:24:11 +01:00
parent ae18f5de96
commit 348fb6cba5

View File

@ -37,19 +37,20 @@
# tests # tests
, freezegun , freezegun
, pytestCheckHook , pytestCheckHook
, pytest-order
, pytest-xdist , pytest-xdist
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "moto"; pname = "moto";
version = "4.2.6"; version = "4.2.10";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-zgpV1+dWxZpaQ5LHCXqlylPgCqLdP3AACTNWvhXnrvk="; hash = "sha256-kllf4odHSjGsPvhHlB67CX6P+ww9bBBuR89XPbBpM7I=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -95,12 +96,20 @@ buildPythonPackage rec {
nativeCheckInputs = [ nativeCheckInputs = [
freezegun freezegun
pytestCheckHook pytestCheckHook
pytest-order
pytest-xdist pytest-xdist
] ++ passthru.optional-dependencies.all; ] ++ passthru.optional-dependencies.all;
# Some tests depend on AWS credentials environment variables to be set.
env.AWS_ACCESS_KEY_ID = "ak";
env.AWS_SECRET_ACCESS_KEY = "sk";
pytestFlagsArray = [ pytestFlagsArray = [
"-m" "'not network and not requires_docker'" "-m" "'not network and not requires_docker'"
# Matches upstream configuration, presumably due to expensive setup/teardown.
"--dist" "loadscope"
# Fails at local name resolution # Fails at local name resolution
"--deselect=tests/test_s3/test_multiple_accounts_server.py::TestAccountIdResolution::test_with_custom_request_header" "--deselect=tests/test_s3/test_multiple_accounts_server.py::TestAccountIdResolution::test_with_custom_request_header"
"--deselect=tests/test_s3/test_server.py::test_s3_server_post_cors_multiple_origins" "--deselect=tests/test_s3/test_server.py::test_s3_server_post_cors_multiple_origins"
@ -120,21 +129,17 @@ buildPythonPackage rec {
# https://github.com/getmoto/moto/pull/6938 # https://github.com/getmoto/moto/pull/6938
"--deselect=tests/test_awslambda/test_lambda_layers_invoked.py::test_invoke_local_lambda_layers" "--deselect=tests/test_awslambda/test_lambda_layers_invoked.py::test_invoke_local_lambda_layers"
# Racy, expects two timestamp two differ # Flaky under parallel execution
# https://github.com/getmoto/moto/issues/6946 "--deselect=tests/test_cloudformation/test_server.py::test_cloudformation_server_get"
"--deselect=tests/test_databrew/test_databrew_recipes.py::test_publish_recipe" "--deselect=tests/test_core/test_moto_api.py::TestModelDataResetForClassDecorator::test_should_find_bucket"
]; ];
disabledTestPaths = [ disabledTestPaths = [
# Requires pytest-ordering, which is unmaintained # Flaky under parallel execution, Connection Reset errors to localhost.
# https://github.com/getmoto/moto/issues/6937 "tests/test_moto_api/recorder/test_recorder.py"
# botocore.exceptions.NoCredentialsError: Unable to locate credentials
"tests/test_dynamodb/test_dynamodb_statements.py" # Flaky under parallel execution
"tests/test_lakeformation/test_resource_tags_integration.py" "tests/test_resourcegroupstaggingapi/*.py"
"tests/test_redshiftdata/test_redshiftdata.py"
"tests/test_s3/test_s3_file_handles.py"
"tests/test_s3/test_s3.py"
"tests/test_s3/test_s3_select.py"
# Tries to access the network # Tries to access the network
"tests/test_batch/test_batch_jobs.py" "tests/test_batch/test_batch_jobs.py"