instance_id stringlengths 15 28 | hints_text stringlengths 0 14.4k | patch stringlengths 296 7.36k | test_patch stringlengths 377 27.2k | created_at stringlengths 19 20 | problem_statement stringlengths 245 17.8k | repo stringclasses 11
values | base_commit stringlengths 40 40 | version stringlengths 3 7 | PASS_TO_PASS sequencelengths 0 2.84k | FAIL_TO_PASS sequencelengths 1 17 |
|---|---|---|---|---|---|---|---|---|---|---|
getmoto__moto-5752 | Here's the culprit:
https://github.com/spulec/moto/blob/8f074b0799e4e5303f219549e177d52b016c2dfb/moto/ssm/models.py#L1612
That line returns True from the middle of the for loop. But that function is supposed to only return False from the for loop, and True at the end.
A solution would be something like:
```... | diff --git a/moto/ssm/models.py b/moto/ssm/models.py
--- a/moto/ssm/models.py
+++ b/moto/ssm/models.py
@@ -1606,22 +1606,26 @@ def _match_filters(self, parameter, filters=None):
else:
continue
elif key.startswith("tag:"):
- what = key[4:] or None
- ... | diff --git a/tests/test_ssm/test_ssm_boto3.py b/tests/test_ssm/test_ssm_boto3.py
--- a/tests/test_ssm/test_ssm_boto3.py
+++ b/tests/test_ssm/test_ssm_boto3.py
@@ -67,21 +67,14 @@ def test_delete_parameters():
def test_get_parameters_by_path():
client = boto3.client("ssm", region_name="us-east-1")
- client.pu... | 2022-12-10 20:23:01 | describe_parameters depends on filter order, but shouldn't
# Summary
When calling `ssm` `describe_parameters`, you can pass in a list of filters.
I have seen different behavior based on the order of my filters.
With certain orders, the values returned do not match the filters.
# MWE
Let's create two paramete... | getmoto/moto | b2300f1eae1323e3e8bc45f97e530ce129dff12e | 4.0 | [
"tests/test_ssm/test_ssm_boto3.py::test_get_parameters_should_only_return_unique_requests",
"tests/test_ssm/test_ssm_boto3.py::test_describe_parameters_attributes",
"tests/test_ssm/test_ssm_boto3.py::test_describe_parameters_invalid_parameter_filters[filters6-The",
"tests/test_ssm/test_ssm_boto3.py::test_desc... | [
"tests/test_ssm/test_ssm_boto3.py::test_describe_parameters__multiple_tags"
] |
getmoto__moto-6178 | I thought I could attach my example code to the ticket. Looks like that won't work. Instead here it is pasted inline:
import boto3
import json
import unittest
from datetime import datetime, timedelta
from moto import mock_dynamodb
# Reported to the moto project on github as:
# h... | diff --git a/moto/dynamodb/parsing/key_condition_expression.py b/moto/dynamodb/parsing/key_condition_expression.py
--- a/moto/dynamodb/parsing/key_condition_expression.py
+++ b/moto/dynamodb/parsing/key_condition_expression.py
@@ -160,8 +160,10 @@ def parse_expression(
if crnt_char == "(":
# hashk... | diff --git a/tests/test_dynamodb/models/test_key_condition_expression_parser.py b/tests/test_dynamodb/models/test_key_condition_expression_parser.py
--- a/tests/test_dynamodb/models/test_key_condition_expression_parser.py
+++ b/tests/test_dynamodb/models/test_key_condition_expression_parser.py
@@ -179,6 +179,24 @@ def ... | 2023-04-05 01:41:06 | DynamoDB query with brackets in KeyConditionExpression causes: Invalid function name; function:
See the attached testcase
I have found that when mocking DynamoDB and running a query, if I put brackets in my KeyConditionExpression then it raises an error
My KeyConditionExpression is `(#audit_object_id = :object_id... | getmoto/moto | 9f91ac0eb96b1868905e1555cb819757c055b652 | 4.1 | [
"tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_reverse_keys[begins_with(start_date,:sk)",
"tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashKey::test_unknown_hash_key",
"tests/test_dynamodb/models/test_key_condition_expression_parser.py:... | [
"tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_brackets[(job_id",
"tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_brackets[job_id"
] |
getmoto__moto-5865 | Thanks for raising this @Bharat23 - marking it as an enhancement to implement this validation.
Just as an implementation note: the docs state that `If you do not specify a cluster, the default cluster is assumed.` Which means that the same error may be raised if you do not specify a cluster, and the `default` cluste... | diff --git a/moto/ecs/models.py b/moto/ecs/models.py
--- a/moto/ecs/models.py
+++ b/moto/ecs/models.py
@@ -808,7 +808,7 @@ def default_vpc_endpoint_service(service_region, zones):
service_region, zones, "ecs"
)
- def _get_cluster(self, name):
+ def _get_cluster(self, name: str) -> Cluster:... | diff --git a/tests/test_ecs/test_ecs_boto3.py b/tests/test_ecs/test_ecs_boto3.py
--- a/tests/test_ecs/test_ecs_boto3.py
+++ b/tests/test_ecs/test_ecs_boto3.py
@@ -701,6 +701,17 @@ def test_list_services():
cluster1_fargate_services["serviceArns"][0].should.equal(test_ecs_service2_arn)
+@mock_ecs
+@pytest.mark.... | 2023-01-22 11:05:01 | ECS list_services ClusterNotFoundException Not raised
## Reporting Bugs
Resource/Client:
**ECS**
Method:
**list_services**
When calling the `ecs` `list_services` with a cluster that does not exist (in moto) the API returns an empty list response.
Expected behavior:
It should raise `ClusterNotFoundExcepti... | getmoto/moto | 90e63c1cb5178acaa49cfc301b2688dcaba12115 | 4.1 | [
"tests/test_ecs/test_ecs_boto3.py::test_update_missing_service",
"tests/test_ecs/test_ecs_boto3.py::test_start_task_with_tags",
"tests/test_ecs/test_ecs_boto3.py::test_update_service",
"tests/test_ecs/test_ecs_boto3.py::test_list_task_definitions_with_family_prefix",
"tests/test_ecs/test_ecs_boto3.py::test_... | [
"tests/test_ecs/test_ecs_boto3.py::test_list_unknown_service[unknown]",
"tests/test_ecs/test_ecs_boto3.py::test_list_unknown_service[no"
] |
getmoto__moto-5545 | Hi @hannes-ucsc, thanks for raising this and providing the fix! Much appreciated | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -1421,6 +1421,18 @@ def __init__(self, region_name, account_id):
"s3::keyrestore", transition={"progression": "immediate"}
)
+ def reset(self):
+ # For every key and multipart, Moto op... | diff --git a/tests/test_s3/test_s3_multipart.py b/tests/test_s3/test_s3_multipart.py
--- a/tests/test_s3/test_s3_multipart.py
+++ b/tests/test_s3/test_s3_multipart.py
@@ -1,8 +1,10 @@
import boto3
import os
+import gc
import pytest
import sure # noqa # pylint: disable=unused-import
import requests
+import warning... | 2022-10-09 10:54:38 | Large upload to S3 leaks file handle
```python
$ python -Wall
Python 3.9.12 (main, Oct 8 2022, 00:52:50)
[Clang 14.0.0 (clang-1400.0.29.102)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> from moto.s3.models import S3Backend
>>> s3 = S3Backend('us-west-1',... | getmoto/moto | 1a8f93dce33f1c1c7983a8052ef54de30ff64407 | 4.0 | [
"tests/test_s3/test_s3_multipart.py::test_head_object_returns_part_count",
"tests/test_s3/test_s3_multipart.py::test_multipart_upload_should_return_part_10000",
"tests/test_s3/test_s3_multipart.py::test_complete_multipart_with_empty_partlist",
"tests/test_s3/test_s3_multipart.py::test_multipart_list_parts",
... | [
"tests/test_s3/test_s3_multipart.py::test_reset_after_multipart_upload_closes_file_handles"
] |
getmoto__moto-4833 | Hi @lynkfox, thanks for raising this. Looks like that's a bug on our side - we'll push out a fix shortly.
This does work for classes that extend `unittest.TestCase`, where the setup-method should be called `setUp` (uppercase U), but not for plain classes where the `setup`-method should have a lowercase u. | diff --git a/moto/core/models.py b/moto/core/models.py
--- a/moto/core/models.py
+++ b/moto/core/models.py
@@ -137,11 +137,15 @@ def decorate_class(self, klass):
c for c in klass.__mro__ if c not in [unittest.TestCase, object]
]
# Get a list of all userdefined methods
- supermethod... | diff --git a/tests/test_core/test_decorator_calls.py b/tests/test_core/test_decorator_calls.py
--- a/tests/test_core/test_decorator_calls.py
+++ b/tests/test_core/test_decorator_calls.py
@@ -109,8 +109,9 @@ def test_no_instance_sent_to_staticmethod(self):
@mock_s3
-class TestWithSetup(unittest.TestCase):
+class Te... | 2022-02-04 23:14:17 | new clients/resources do not find the resources created in Setup()
Versions:
moto 3.0.2
boto3 1.20.24
pytest 6.2.5
with the update past 3.0, any of our tests using moto failed with "Resource not Found"
The tests originally looked something like this (which worked under 2.3.2:
(create table creates ... | getmoto/moto | bb6fb1200f8db61e0d39c9a4da5954469a403fb8 | 3.0 | [
"tests/test_core/test_decorator_calls.py::TestWithNestedClasses::TestWithSetup::test_should_not_find_bucket_from_test_method",
"tests/test_core/test_decorator_calls.py::TestSetUpInBaseClass::test_a_thing",
"tests/test_core/test_decorator_calls.py::TestWithInvalidSetupMethod::test_should_not_find_bucket",
"tes... | [
"tests/test_core/test_decorator_calls.py::TestWithSetup_LowercaseU::test_should_find_bucket",
"tests/test_core/test_decorator_calls.py::TestWithSetupMethod::test_should_find_bucket"
] |
getmoto__moto-7105 | Hi @tzven0, can you share a reproducible test case?
Hey, it might take some time, but i think i can.
@tzven0 I've found one error scenario where the `submit_job` operation is called with the `arrayProperties` argument, but the test case does not wait for the execution of the job to finish.
```
def test_submit_job_a... | diff --git a/moto/batch/models.py b/moto/batch/models.py
--- a/moto/batch/models.py
+++ b/moto/batch/models.py
@@ -1055,7 +1055,8 @@ def reset(self) -> None:
if job.status not in (JobStatus.FAILED, JobStatus.SUCCEEDED):
job.stop = True
# Try to join
- job.jo... | diff --git a/tests/test_batch/test_batch_jobs.py b/tests/test_batch/test_batch_jobs.py
--- a/tests/test_batch/test_batch_jobs.py
+++ b/tests/test_batch/test_batch_jobs.py
@@ -1,15 +1,16 @@
import datetime
import time
+from unittest import SkipTest
from uuid import uuid4
import botocore.exceptions
import pytest
... | 2023-12-09 23:39:02 | moto batch - "RuntimeError: cannot join thread before it is started"
Hey,
**after upgrading from moto 4.0.11 to 4.2.11** i am facing the following issue with my previously running pytest. The first test is successfull, the second test, essentially doing the same but with different input, fails.
This is the **trac... | getmoto/moto | 85156f59396a85e83e83200c9df41b66d6f82b68 | 4.2 | [
"tests/test_batch/test_batch_jobs.py::test_submit_job_by_name"
] | [
"tests/test_batch/test_batch_jobs.py::test_submit_job_with_timeout_set_at_definition",
"tests/test_batch/test_batch_jobs.py::test_submit_job_with_timeout",
"tests/test_batch/test_batch_jobs.py::test_register_job_definition_with_timeout",
"tests/test_batch/test_batch_jobs.py::test_cancel_job_empty_argument_str... |
getmoto__moto-6185 | Appreciate the feedback @hidi-adouv, always good to hear that Moto is useful!
When using the DynamoDB client, users have to manually set the type of their attributes - so in your example, with one Number-attribute and one String, that would result in this: `{'index': {'N': '0'}, 'S': {'S': 's'}}`
Moto does some v... | diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py
--- a/moto/dynamodb/models/table.py
+++ b/moto/dynamodb/models/table.py
@@ -484,10 +484,12 @@ def _validate_key_sizes(self, item_attrs: Dict[str, Any]) -> None:
if DynamoType(range_value).size() > RANGE_KEY_MAX_LENGTH:
... | diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
--- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
+++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py
@@ -933,12 +933,21 @@ def test_put_item__string_as_intege... | 2023-04-07 16:35:37 | DynamoDB put_item SerializationException when any key inside the Item is 'S'
Hey everyone, thanks for the all the great work on this library. It makes unit testing a breeze!
I ran into a bit of a strange issue with the Table.put_item() method in a mock DynamoDB table. It looks like if any key inside the item (inclu... | getmoto/moto | dc460a325839bc6797084a54afc297a2c9d87e63 | 4.1 | [
"tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception",
"tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_primary_key",
"tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_creating_table_with_0_local_index... | [
"tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_put_item__string_as_integer_value"
] |
getmoto__moto-6212 | Thanks for letting us know @dani-g1 - that is indeed a bug. Will raise a fix shortly. | diff --git a/moto/athena/models.py b/moto/athena/models.py
--- a/moto/athena/models.py
+++ b/moto/athena/models.py
@@ -42,7 +42,7 @@ def __init__(
self,
athena_backend: "AthenaBackend",
name: str,
- configuration: str,
+ configuration: Dict[str, Any],
description: str,
... | diff --git a/tests/test_athena/test_athena.py b/tests/test_athena/test_athena.py
--- a/tests/test_athena/test_athena.py
+++ b/tests/test_athena/test_athena.py
@@ -12,7 +12,7 @@
def test_create_work_group():
client = boto3.client("athena", region_name="us-east-1")
- response = client.create_work_group(
+ c... | 2023-04-14 19:13:35 | mock_athena fails to get "primary" work group
Hello! After upgrading from moto version 4.1.4 to 4.1.7, we now experience errors when performing the `athena_client.get_work_group(WorkGroup="primary")` call. Querying any other work group than "primary" (existent or non-existent work groups) works fine.
The only code a... | getmoto/moto | 8c0c688c7b37f87dfcc00dbf6318d4dd959f91f5 | 4.1 | [
"tests/test_athena/test_athena.py::test_create_and_get_workgroup",
"tests/test_athena/test_athena.py::test_create_work_group",
"tests/test_athena/test_athena.py::test_stop_query_execution",
"tests/test_athena/test_athena.py::test_get_named_query",
"tests/test_athena/test_athena.py::test_list_query_execution... | [
"tests/test_athena/test_athena.py::test_get_primary_workgroup"
] |
getmoto__moto-6469 | @bblommers I can take a look
@semyonestrin this appears to be the correct behaviour. Try this in aws(lifted from moto tests):
```
import boto3
conn = boto3.client("secretsmanager", region_name="eu-west-1")
conn.create_secret(Name="test-secret", SecretString="foosecret")
conn.delete_secret(
SecretId=... | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -723,7 +723,7 @@ def delete_secret(
force_delete_without_recovery: bool,
) -> Tuple[str, str, float]:
- if recovery_window_in_days and (
+ i... | diff --git a/tests/test_secretsmanager/test_secretsmanager.py b/tests/test_secretsmanager/test_secretsmanager.py
--- a/tests/test_secretsmanager/test_secretsmanager.py
+++ b/tests/test_secretsmanager/test_secretsmanager.py
@@ -355,34 +355,38 @@ def test_delete_secret_fails_with_both_force_delete_flag_and_recovery_windo... | 2023-06-30 21:22:44 | delete_secret accepts invalid input and then fails
The following call is accepted by moto `delete_secret` validations but runtime AWS error is issued
```
self.secrets_client.delete_secret(
SecretId=creds_name,
RecoveryWindowInDays=0,
ForceDeleteWithoutR... | getmoto/moto | 3e11578a7288122e7f2c2a0238c3338f56f8582f | 4.1 | [
"tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_that_has_no_value",
"tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_value_by_arn",
"tests/test_secretsmanager/test_secretsmanager.py::test_update_secret_with_KmsKeyId",
"tests/test_secretsmanager/test_secretsmanager.py::test... | [
"tests/test_secretsmanager/test_secretsmanager.py::test_delete_secret_recovery_window_invalid_values",
"tests/test_secretsmanager/test_secretsmanager.py::test_delete_secret_force_no_such_secret_with_invalid_recovery_window"
] |
getmoto__moto-7111 | Hi @omerls-pw, welcome to Moto, and thanks for raising this.
If PackageType is specified during creation, we do return this value - so I _think_ the problem is that we do not return a default value. Marking it as a bug. | diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py
--- a/moto/awslambda/models.py
+++ b/moto/awslambda/models.py
@@ -620,7 +620,7 @@ def __init__(
self.description = spec.get("Description", "")
self.memory_size = spec.get("MemorySize", 128)
- self.package_type = spec.get("Packag... | diff --git a/tests/test_awslambda/__init__.py b/tests/test_awslambda/__init__.py
--- a/tests/test_awslambda/__init__.py
+++ b/tests/test_awslambda/__init__.py
@@ -1 +1,108 @@
-# This file is intentionally left blank.
+import json
+import os
+from functools import wraps
+from time import sleep
+from uuid import uuid4
+
... | 2023-12-10 19:42:21 | mock_lambda missing PackageType attribute
I'm trying to test against zip based only lambdas, but the return object is missing `PackageType`.
test:
```python
@mock_lambda
def test_list_zipped_lambdas(self):
self.setup_mock_iam_role()
# with mock_lambda():
client = boto3.client(... | getmoto/moto | 90850bc57314b2c7fa62b4917577b1a24a528f25 | 4.2 | [
"tests/test_awslambda/test_lambda.py::test_put_event_invoke_config[config0]",
"tests/test_awslambda/test_lambda.py::test_publish_version_unknown_function[bad_function_name]",
"tests/test_awslambda/test_lambda.py::test_create_function_with_already_exists",
"tests/test_awslambda/test_lambda.py::test_create_func... | [
"tests/test_awslambda/test_lambda.py::test_list_functions",
"tests/test_awslambda/test_lambda.py::test_list_create_list_get_delete_list",
"tests/test_awslambda/test_lambda.py::test_create_function_from_zipfile"
] |
getmoto__moto-5286 | Thanks for raising this @janoskranczler! | diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -443,6 +443,21 @@ def __init__(self, region, name, extended_config):
) as f:
self.json_web_key = json.loads(f.read())
+ @property
+ def backend(self):
+ ... | diff --git a/tests/test_cognitoidp/test_cognitoidp.py b/tests/test_cognitoidp/test_cognitoidp.py
--- a/tests/test_cognitoidp/test_cognitoidp.py
+++ b/tests/test_cognitoidp/test_cognitoidp.py
@@ -870,6 +870,8 @@ def test_describe_user_pool_domain():
result["DomainDescription"]["Domain"].should.equal(domain)
re... | 2022-07-03 01:04:00 | Cognito client describe_user_pool does not return with associated domain
Hi,
I would like to test our programmatically created user pool's domain but it seems that the user pool's domain property is not implemented in the `describe_user_pool()` response in moto.
I'm using boto version `1.24.20` and moto version `3.... | getmoto/moto | fff61af6fc9eb2026b0d9eb14b5f5a52f263a406 | 3.1 | [
"tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_required",
"tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up",
"tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unknown_accesstoken",
"tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool",... | [
"tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_domain"
] |
getmoto__moto-6470 | Hey @RealSalmon-Komodo, thanks for raising this. Looks like AWS throws an error in this scenario because the `Instance role is required` - we'll add the same validation to Moto. | diff --git a/moto/batch/models.py b/moto/batch/models.py
--- a/moto/batch/models.py
+++ b/moto/batch/models.py
@@ -1272,6 +1272,10 @@ def _validate_compute_resources(self, cr: Dict[str, Any]) -> None:
if "FARGATE" not in cr["type"]:
# Most parameters are not applicable to jobs that are running on ... | diff --git a/tests/test_batch/test_batch_compute_envs.py b/tests/test_batch/test_batch_compute_envs.py
--- a/tests/test_batch/test_batch_compute_envs.py
+++ b/tests/test_batch/test_batch_compute_envs.py
@@ -395,3 +395,47 @@ def test_create_fargate_managed_compute_environment(compute_env_type):
# Should have create... | 2023-06-30 22:03:41 | batch.create_compute_environment() call fails against moto server
When calling `create_compute_environment()` for Batch against the server version of moto, a 500 response is returned. I have pasted a script to replicate the issue below, along with the output I am seeing.
To replicate, run the following...
```pyth... | getmoto/moto | 3e11578a7288122e7f2c2a0238c3338f56f8582f | 4.1 | [
"tests/test_batch/test_batch_compute_envs.py::test_update_unmanaged_compute_environment_state",
"tests/test_batch/test_batch_compute_envs.py::test_delete_managed_compute_environment",
"tests/test_batch/test_batch_compute_envs.py::test_describe_compute_environment",
"tests/test_batch/test_batch_compute_envs.py... | [
"tests/test_batch/test_batch_compute_envs.py::test_create_ec2_managed_compute_environment__without_required_params"
] |
getmoto__moto-7584 | Hi @DiegoHDMGZ, it looks like the `delete_endpoint` in AWS is effectively an asyncronous operation. If you call `subscribe` immediately after the `delete_endpoint`, it does succeed. The `InvalidParameterException` only occurs when you try to subscribe 10 seconds after deletion.
I'll mark it as an enhancement, but I ... | diff --git a/moto/sns/models.py b/moto/sns/models.py
--- a/moto/sns/models.py
+++ b/moto/sns/models.py
@@ -515,6 +515,18 @@ def subscribe(self, topic_arn: str, endpoint: str, protocol: str) -> Subscriptio
old_subscription = self._find_subscription(topic_arn, endpoint, protocol)
if old_subscription:
... | diff --git a/tests/test_sns/test_application_boto3.py b/tests/test_sns/test_application_boto3.py
--- a/tests/test_sns/test_application_boto3.py
+++ b/tests/test_sns/test_application_boto3.py
@@ -438,6 +438,50 @@ def test_publish_to_disabled_platform_endpoint(api_key=None):
conn.delete_platform_application(... | 2024-04-09 18:32:57 | SNS `subscribe` should raise `InvalidParameterException` when the endpoint does not exist using `application` protocol
Currently, moto allows subscribing a non-existing endpoint to a topic when the `application` protocol is used. It would be nice if moto could match the behavior on AWS. On AWS, an `InvalidParameterExce... | getmoto/moto | cc1193076090f9daf90970db286b6b41581dd8bc | 5.0 | [
"tests/test_sns/test_application_boto3.py::test_delete_platform_application",
"tests/test_sns/test_application_boto3.py::test_publish_to_disabled_platform_endpoint",
"tests/test_sns/test_application_boto3.py::test_get_list_endpoints_by_platform_application",
"tests/test_sns/test_application_boto3.py::test_set... | [
"tests/test_sns/test_application_boto3.py::test_publish_to_deleted_platform_endpoint"
] |
getmoto__moto-6308 | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -1627,7 +1627,7 @@ def _key_response_put(
checksum_algorithm = request.headers.get("x-amz-checksum-algorithm")
if checksum_algorithm:
checksum_value = compute_chec... | diff --git a/tests/test_s3/test_s3_copyobject.py b/tests/test_s3/test_s3_copyobject.py
--- a/tests/test_s3/test_s3_copyobject.py
+++ b/tests/test_s3/test_s3_copyobject.py
@@ -68,6 +68,18 @@ def test_copy_key_boto3_with_sha256_checksum():
assert "ChecksumSHA256" in resp["Checksum"]
assert resp["Checksum"]["Che... | 2023-05-10 09:29:21 | S3 CopyObject in place with Checksum raises an exception
Since adding the checksum to CopyObject, moto will raise an exception if you try to copy an object in place while requesting its checksum, because it tries to use the source key `.value`, but that key has been overwritten by the new one copied one in place.
He... | getmoto/moto | 52846c9555a3077b11a391fbfcd619d0d6e776f6 | 4.1 | [
"tests/test_s3/test_s3_copyobject.py::test_copy_key_replace_metadata",
"tests/test_s3/test_s3_copyobject.py::test_copy_object_from_unversioned_to_versioned_bucket",
"tests/test_s3/test_s3_copyobject.py::test_copy_object_in_place_with_metadata",
"tests/test_s3/test_s3_copyobject.py::test_copy_key_boto3[the-key... | [
"tests/test_s3/test_s3_copyobject.py::test_copy_key_boto3_with_sha256_checksum"
] | |
getmoto__moto-5417 | Thank you for raising this and providing the repro @ColdrickSotK! Marking it as a bug. | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -1156,7 +1156,7 @@ def _key_response(self, request, full_url, headers):
key = self.backend.get_object(bucket_name, key_name)
if key:
- if not key.acl.public_read a... | diff --git a/tests/test_s3/test_s3_multipart.py b/tests/test_s3/test_s3_multipart.py
--- a/tests/test_s3/test_s3_multipart.py
+++ b/tests/test_s3/test_s3_multipart.py
@@ -2,6 +2,7 @@
import os
import pytest
import sure # noqa # pylint: disable=unused-import
+import requests
from botocore.client import ClientErro... | 2022-08-24 11:20:58 | Default ACL not set for multipart upload
## Context
When using moto's implementation of S3's multipart upload to upload an object, the ACL seems like it is not set on the object unless it is specified explicitly by the uploader. This causes problems with subsequent requests to access the object, eg. `HeadObject`.
... | getmoto/moto | 3e6394e641f29110ed29deb2e9806e2f9cb7106f | 4.0 | [
"tests/test_s3/test_s3_multipart.py::test_multipart_upload_should_return_part_10000",
"tests/test_s3/test_s3_multipart.py::test_complete_multipart_with_empty_partlist",
"tests/test_s3/test_s3_multipart.py::test_multipart_list_parts",
"tests/test_s3/test_s3_multipart.py::test_multipart_version",
"tests/test_... | [
"tests/test_s3/test_s3_multipart.py::test_generate_presigned_url_on_multipart_upload_without_acl"
] |
getmoto__moto-4847 | Thanks for raising this @inai-shreyas - will mark it as an enhancement to return the right attributes here.
Waiting for that @bblommers thanks for all of your efforts.
Word of warning - requests like this are logged, but that is no guarantee that they will be fixed. If this is something you really need, it may be qui... | diff --git a/moto/acm/models.py b/moto/acm/models.py
--- a/moto/acm/models.py
+++ b/moto/acm/models.py
@@ -367,17 +367,36 @@ def describe(self):
"KeyAlgorithm": key_algo,
"NotAfter": datetime_to_epoch(self._cert.not_valid_after),
"NotBefore": datetime_to_epoch(self._ce... | diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt
--- a/tests/terraform-tests.success.txt
+++ b/tests/terraform-tests.success.txt
@@ -1,4 +1,5 @@
TestAccAWSAccessKey
+TestAccAWSAcmCertificateDataSource
TestAccAWSAPIGatewayV2Authorizer
TestAccAWSAPIGatewayV2IntegrationResponse
TestAc... | 2022-02-09 21:15:36 | [ACM] while requesting a certificate with DNS validation no DomainValidationOptions present on describe certificate
## Reporting Bugs
While requesting for a certificate with DNS as the validation option and then Describing the certificate does not return DomainValidationOptions
how to reproduce
```python
acm_cl... | getmoto/moto | de559e450dd921bf7f85b0750001a6cb4f840758 | 3.0 | [
"tests/test_acm/test_acm.py::test_import_certificate_with_tags",
"tests/test_acm/test_acm.py::test_resend_validation_email_invalid",
"tests/test_acm/test_acm.py::test_remove_tags_from_invalid_certificate",
"tests/test_acm/test_acm.py::test_import_certificate",
"tests/test_acm/test_acm.py::test_request_certi... | [
"tests/test_acm/test_acm.py::test_request_certificate_no_san",
"tests/test_acm/test_acm.py::test_describe_certificate"
] |
getmoto__moto-5699 | diff --git a/moto/cloudfront/responses.py b/moto/cloudfront/responses.py
--- a/moto/cloudfront/responses.py
+++ b/moto/cloudfront/responses.py
@@ -622,6 +622,7 @@ def list_tags_for_resource(self) -> TYPE_RESPONSE:
INVALIDATIONS_TEMPLATE = """<?xml version="1.0" encoding="UTF-8"?>
<InvalidationList>
<IsTruncated>f... | diff --git a/tests/test_cloudfront/test_cloudfront_invalidation.py b/tests/test_cloudfront/test_cloudfront_invalidation.py
--- a/tests/test_cloudfront/test_cloudfront_invalidation.py
+++ b/tests/test_cloudfront/test_cloudfront_invalidation.py
@@ -76,4 +76,4 @@ def test_list_invalidations__no_entries():
resp["Inval... | 2022-11-22 15:04:13 | CloudFront: list_invalidations includes empty element if no invalidations
## How to reproduce the issue
```python
@mock_cloudfront
def test_list_invalidations__no_entries():
client = boto3.client("cloudfront", region_name="us-west-1")
resp = client.list_invalidations(
DistributionId="SPAM",
... | getmoto/moto | b4f59b771cc8a89976cbea8c889758c132d405d0 | 4.0 | [
"tests/test_cloudfront/test_cloudfront_invalidation.py::test_list_invalidations",
"tests/test_cloudfront/test_cloudfront_invalidation.py::test_create_invalidation"
] | [
"tests/test_cloudfront/test_cloudfront_invalidation.py::test_list_invalidations__no_entries"
] | |
getmoto__moto-5794 | Thanks for raising this and for providing the test case @deanq! Marking it as a bug. | diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -627,6 +627,10 @@ def sign_out(self, username: str) -> None:
_, logged_in_user = token_tuple
if username == logged_in_user:
self.refresh_tokens... | diff --git a/tests/test_cognitoidp/test_cognitoidp.py b/tests/test_cognitoidp/test_cognitoidp.py
--- a/tests/test_cognitoidp/test_cognitoidp.py
+++ b/tests/test_cognitoidp/test_cognitoidp.py
@@ -3212,6 +3212,12 @@ def test_global_sign_out():
err["Code"].should.equal("NotAuthorizedException")
err["Message"].sh... | 2022-12-20 19:43:34 | Bug: global_sign_out does not actually sign out
The current test code for `global_sign_out` only checks against a refresh token action. If you do a sign out and try to access a protected endpoint, like say `get_user(AccessToken)`, it should result to `NotAuthorizedException`. This is not the case as of the current vers... | getmoto/moto | 027572177da3e95b8f5b4a3e611fe6a7f969e1b1 | 4.0 | [
"tests/test_cognitoidp/test_cognitoidp.py::test_list_groups_when_limit_more_than_total_items",
"tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_required",
"tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up",
"tests/test_cognitoidp/test_cognitoidp.py::test_ge... | [
"tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out"
] |
End of preview. Expand in Data Studio
SWE-Gym Lite contains 230 instances sourced from 11 Python repos, following SWE-Bench Lite data collection procedure.
Get started at project page github.com/SWE-Gym/SWE-Gym
- Downloads last month
- 241

