Dataset Viewer
Auto-converted to Parquet Duplicate
instance_id
string
hints_text
string
patch
string
test_patch
string
created_at
string
problem_statement
string
repo
string
base_commit
string
version
string
PASS_TO_PASS
list
FAIL_TO_PASS
list
eval_script
string
__index_level_0__
int64
getmoto__moto-6641
Hi @JAChez, thanks for raising this, and welcome to Moto! Marking it as an an enhancement to add this validation.
diff --git a/moto/scheduler/exceptions.py b/moto/scheduler/exceptions.py --- a/moto/scheduler/exceptions.py +++ b/moto/scheduler/exceptions.py @@ -2,6 +2,11 @@ from moto.core.exceptions import JsonRESTError +class ScheduleExists(JsonRESTError): + def __init__(self, name: str) -> None: + super().__init__(...
diff --git a/tests/test_scheduler/test_scheduler.py b/tests/test_scheduler/test_scheduler.py --- a/tests/test_scheduler/test_scheduler.py +++ b/tests/test_scheduler/test_scheduler.py @@ -144,6 +144,26 @@ def test_update_schedule(extra_kwargs): assert schedule["CreationDate"] != schedule["LastModificationDate"] ...
2023-08-12 18:48:17
Scheduler not raising ConflictException when duplicate schedules created Boto3 will raise a `ConflictException` when an Eventbridge schedule is created with the same name as an existing schedule. While mocking with moto, this exception is not raised. The response returns a success status and the second schedule is simp...
getmoto/moto
c8b5470e25012477f817a619e88f9ad1bea08bbe
4.1
[ "tests/test_scheduler/test_scheduler.py::test_list_schedules", "tests/test_scheduler/test_scheduler.py::test_create_get_schedule", "tests/test_scheduler/test_scheduler.py::test_create_get_delete__in_different_group", "tests/test_scheduler/test_scheduler.py::test_update_schedule[with_group]", "tests/test_sch...
[ "tests/test_scheduler/test_scheduler.py::test_create_duplicate_schedule" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff c8b5470e25012477f8...
25
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" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff bb6fb1200f8db61e0d...
42
getmoto__moto-5940
Hey @nicor88, thanks for raising this. The `VersionId` should actually be returned twice, according to the AWS docs: once as part of the key of Table, and one separate. :confused: Marking it as a bug. @bblommers ah I see, as mentioned above also UpdateTime seems missing.
diff --git a/moto/glue/models.py b/moto/glue/models.py --- a/moto/glue/models.py +++ b/moto/glue/models.py @@ -130,7 +130,7 @@ def create_table(self, database_name, table_name, table_input): database.tables[table_name] = table return table - def get_table(self, database_name, table_name): + de...
diff --git a/tests/test_glue/test_datacatalog.py b/tests/test_glue/test_datacatalog.py --- a/tests/test_glue/test_datacatalog.py +++ b/tests/test_glue/test_datacatalog.py @@ -339,11 +339,13 @@ def test_get_table_versions(): for n, ver in enumerate(vers): n = str(n + 1) ver["VersionId"].should.equ...
2023-02-16 23:00:33
Incorect response when calling glue.get_table_versions ## Reporting Bugs The current implementation of glue.get_table_versions, see [here](https://github.com/getmoto/moto/blob/78840fd71c365bb40214f59a9d7c5f5f3d00b850/moto/glue/responses.py#L73-L85) it's different from the actual response from boto3. Specifically ...
getmoto/moto
418c69f477add62271938fbf4c1b8117087f4cd8
4.1
[ "tests/test_glue/test_datacatalog.py::test_delete_database", "tests/test_glue/test_datacatalog.py::test_create_partition_already_exist", "tests/test_glue/test_datacatalog.py::test_get_partitions_empty", "tests/test_glue/test_datacatalog.py::test_create_database", "tests/test_glue/test_datacatalog.py::test_b...
[ "tests/test_glue/test_datacatalog.py::test_get_table_versions" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 418c69f477add62271...
109
getmoto__moto-5202
diff --git a/moto/s3/models.py b/moto/s3/models.py --- a/moto/s3/models.py +++ b/moto/s3/models.py @@ -32,6 +32,8 @@ BackendDict, ) from moto.cloudwatch.models import MetricDatum +from moto.moto_api import state_manager +from moto.moto_api._internal.managed_state_model import ManagedState from moto.utilities.ta...
diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py --- a/tests/test_s3/test_s3.py +++ b/tests/test_s3/test_s3.py @@ -15,6 +15,7 @@ from freezegun import freeze_time import requests +from moto.moto_api import state_manager from moto.s3.responses import DEFAULT_REGION_NAME from unittest import SkipTes...
2022-06-08 14:54:10
Feature Request: Add support for S3 glacier restore transitions ## Feature Request Adding support for testing the transition when restoring files from S3 Glacier to standard storage class. ## Motivation When files in S3 are restored from Glacier to standard storage class, the `Restore` attribute (`x-amz-restor...
getmoto/moto
4aa5e4388d4a9a7d4a95c265552e2d4b4c1ba376
3.1
[ "tests/test_s3/test_s3.py::test_put_bucket_notification", "tests/test_s3/test_s3.py::test_get_bucket_cors", "tests/test_s3/test_s3.py::test_get_object", "tests/test_s3/test_s3.py::test_create_bucket_duplicate", "tests/test_s3/test_s3.py::test_list_objects_with_pagesize_0", "tests/test_s3/test_s3.py::test_...
[ "tests/test_s3/test_s3.py::test_restore_key_transition" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 4aa5e4388d4a9a7d4a...
113
getmoto__moto-6687
diff --git a/moto/cloudtrail/models.py b/moto/cloudtrail/models.py --- a/moto/cloudtrail/models.py +++ b/moto/cloudtrail/models.py @@ -300,21 +300,22 @@ def get_trail(self, name_or_arn: str) -> Trail: def get_trail_status(self, name: str) -> TrailStatus: if len(name) < 3: raise TrailNameTooSh...
diff --git a/tests/test_cloudtrail/test_cloudtrail.py b/tests/test_cloudtrail/test_cloudtrail.py --- a/tests/test_cloudtrail/test_cloudtrail.py +++ b/tests/test_cloudtrail/test_cloudtrail.py @@ -319,6 +319,38 @@ def test_get_trail_status_after_starting_and_stopping(): assert "TimeLoggingStopped" in status # .equa...
2023-08-17 07:53:29
@mock_cloudtrail is not being able to retrieve the trail status in a different region for a multiregion trail ## Description As per the AWS Boto3 documentation, the [get_trail_status](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudtrail/client/get_trail_status.html) call is able to g...
getmoto/moto
1fe69d55a50b404d7c0a59707e88ce03c5ded784
4.1
[ "tests/test_cloudtrail/test_cloudtrail.py::test_list_trails_different_home_region_no_multiregion", "tests/test_cloudtrail/test_cloudtrail.py::test_update_trail_full", "tests/test_cloudtrail/test_cloudtrail.py::test_get_trail_unknown", "tests/test_cloudtrail/test_cloudtrail.py::test_get_trail_status_inactive",...
[ "tests/test_cloudtrail/test_cloudtrail.py::test_get_trail_status_multi_region_not_from_the_home_region" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 1fe69d55a50b404d7c...
116
getmoto__moto-6410
diff --git a/moto/moto_api/_internal/responses.py b/moto/moto_api/_internal/responses.py --- a/moto/moto_api/_internal/responses.py +++ b/moto/moto_api/_internal/responses.py @@ -68,7 +68,7 @@ def model_data( if not attr.startswith("_"): try: ...
diff --git a/tests/test_core/test_moto_api.py b/tests/test_core/test_moto_api.py --- a/tests/test_core/test_moto_api.py +++ b/tests/test_core/test_moto_api.py @@ -14,6 +14,7 @@ if settings.TEST_SERVER_MODE else "http://motoapi.amazonaws.com" ) +data_url = f"{base_url}/moto-api/data.json" @mock_sqs @@ -3...
2023-06-14 20:58:23
server: Overwriting a binary object in S3 causes `/moto-api/data.json` to fail - **Moto version:** 759f26c6d (git cloned) - **Python version:** 3.11.4 - **OS:** macOS 13.4 After storing a binary file in S3 on the server and overwriting it, the server's dashboard fails to load due to an unhandled exception while fe...
getmoto/moto
1dfbeed5a72a4bd57361e44441d0d06af6a2e58a
4.1
[ "tests/test_core/test_moto_api.py::test_model_data_is_emptied_as_necessary", "tests/test_core/test_moto_api.py::test_reset_api", "tests/test_core/test_moto_api.py::test_creation_error__data_api_still_returns_thing", "tests/test_core/test_moto_api.py::test_data_api", "tests/test_core/test_moto_api.py::TestMo...
[ "tests/test_core/test_moto_api.py::test_overwriting_s3_object_still_returns_data" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 1dfbeed5a72a4bd573...
118
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" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff b4f59b771cc8a89976...
124
getmoto__moto-6756
I just ran `python scripts/scaffold.py` and typed in `sagemaker` and `list_notebook_instances`. I can't see anything added for the paginator. Is there any scaffold script to add that for me? When I run `git status` to see what the `scaffold.py` script did, I see: ``` Changes not staged for commit: (use "gi...
diff --git a/moto/sagemaker/models.py b/moto/sagemaker/models.py --- a/moto/sagemaker/models.py +++ b/moto/sagemaker/models.py @@ -29,35 +29,36 @@ "limit_key": "MaxResults", "limit_default": 100, "unique_attribute": "experiment_arn", - "fail_on_invalid_token": True, }, "list_...
diff --git a/tests/test_sagemaker/test_sagemaker_notebooks.py b/tests/test_sagemaker/test_sagemaker_notebooks.py --- a/tests/test_sagemaker/test_sagemaker_notebooks.py +++ b/tests/test_sagemaker/test_sagemaker_notebooks.py @@ -26,7 +26,7 @@ FAKE_INSTANCE_TYPE_PARAM = "ml.t2.medium" -@pytest.fixture(name="sagemaker...
2023-09-01 20:24:33
[Feature request] SageMaker list and notebook instances Currently Moto can create a fake SageMaker notebook instance, and delete it, and describe it's lifecycle config, and list tags for it. I want to add functionality to list notebook instances, including the `list_notebook_instances` paginator. This is somethin...
getmoto/moto
c59fee5d352e429309ddce7f8350ef70f2003593
4.2
[ "tests/test_sagemaker/test_sagemaker_notebooks.py::test_notebook_instance_lifecycle_config", "tests/test_sagemaker/test_sagemaker_notebooks.py::test_add_tags_to_notebook", "tests/test_sagemaker/test_sagemaker_notebooks.py::test_create_notebook_instance_params", "tests/test_sagemaker/test_sagemaker_notebooks.p...
[ "tests/test_sagemaker/test_sagemaker_notebooks.py::test_list_notebook_instances", "tests/test_sagemaker/test_sagemaker_notebooks.py::test_notebook_instance_lifecycle" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff c59fee5d352e429309...
126
getmoto__moto-4896
Hi @07pepa, thanks for raising this. The second example fails for me as well - I'll look into why that's happening later. The first example, with `mock_s3`-decorator first, does work as expected for me. My reproducible test: ``` @mock_s3 @responses.activate def test_moto_first(): moto_responses_compat...
diff --git a/moto/core/custom_responses_mock.py b/moto/core/custom_responses_mock.py --- a/moto/core/custom_responses_mock.py +++ b/moto/core/custom_responses_mock.py @@ -100,7 +100,8 @@ def not_implemented_callback(request): # - Same request, executed again, will be matched on the subsequent match, which happens to ...
diff --git a/tests/test_core/test_responses_module.py b/tests/test_core/test_responses_module.py new file mode 100644 --- /dev/null +++ b/tests/test_core/test_responses_module.py @@ -0,0 +1,63 @@ +""" +Ensure that the responses module plays nice with our mocks +""" + +import boto3 +import requests +import responses +fr...
2022-02-28 20:03:06
moto breaks repsonses library usage if moto is used with responses for mocking request responses library will be broken ```python import responses from moto import mock_s3 @mock_s3 @responses.activate def test(): responses.add( responses.POST, url='http://someurl', body="4", ...
getmoto/moto
8bbfe9c151e62952b153f483d3604b57c7e99ab6
3.0
[ "tests/test_core/test_responses_module.py::TestResponsesModule::test_moto_first" ]
[ "tests/test_core/test_responses_module.py::TestResponsesModule::test_moto_second", "tests/test_core/test_responses_module.py::TestResponsesModule::test_moto_as_late_as_possible" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 8bbfe9c151e62952b1...
147
getmoto__moto-6567
diff --git a/moto/rds/models.py b/moto/rds/models.py --- a/moto/rds/models.py +++ b/moto/rds/models.py @@ -182,7 +182,7 @@ def __init__(self, **kwargs: Any): self.preferred_backup_window = "01:37-02:07" self.preferred_maintenance_window = "wed:02:40-wed:03:10" # This should default to the def...
diff --git a/tests/test_rds/test_rds_clusters.py b/tests/test_rds/test_rds_clusters.py --- a/tests/test_rds/test_rds_clusters.py +++ b/tests/test_rds/test_rds_clusters.py @@ -193,29 +193,13 @@ def test_create_db_cluster__verify_default_properties(): ).should.be.greater_than_or_equal_to(cluster["ClusterCreateTime"]...
2023-07-28 10:14:41
Missing vpc security group name from rds.create_db_cluster response ## Reporting Bugs When we provide a vpc security group id for rds.create_db_cluster, the response of this create returns an empty list for `'VpcSecurityGroups': []`. I am using boto3 & mocking this call using moto library's mock_rds method. The r...
getmoto/moto
b52fd80cb1cfd8ecc02c3ec75f481001d33c194e
4.1
[ "tests/test_rds/test_rds_clusters.py::test_start_db_cluster_without_stopping", "tests/test_rds/test_rds_clusters.py::test_modify_db_cluster_needs_long_master_user_password", "tests/test_rds/test_rds_clusters.py::test_modify_db_cluster_new_cluster_identifier", "tests/test_rds/test_rds_clusters.py::test_copy_db...
[ "tests/test_rds/test_rds_clusters.py::test_create_db_cluster_additional_parameters" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff b52fd80cb1cfd8ecc0...
152
getmoto__moto-4799
Hi @crbunney, thanks for raising this - marking it as a bug. An additional workaround is to remove the `tearDown`-method altogether for this example - Moto will reset the state automatically at the beginning of each test. I'll make sure this is better reflected in the documentation.
diff --git a/moto/core/models.py b/moto/core/models.py --- a/moto/core/models.py +++ b/moto/core/models.py @@ -127,16 +127,21 @@ def wrapper(*args, **kwargs): return wrapper def decorate_class(self, klass): - direct_methods = set( - x - for x, y in klass.__dict__.items() - ...
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 @@ -159,6 +159,26 @@ def test_should_not_find_bucket(self): s3.head_bucket(Bucket="mybucket") +@mock_s3 +class Basec...
2022-01-26 23:16:33
"Bucket does not exist" thrown from inherited tearDown method in moto 3.0.1 I have this code: ```python import unittest import boto3 from moto import mock_s3 @mock_s3 class BaseTest(unittest.TestCase): def setUp(self) -> None: self.s3 = boto3.resource('s3') self.test_bucket = self.s...
getmoto/moto
fc1ef55adc7e0c886602149cfe9c1dc04645952b
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::test_context_manager", "tests/test_core/test_decorator_calls.py::Tester::test_still_the_same", "tests/test_core/test_decorator_calls.py::Test...
[ "tests/test_core/test_decorator_calls.py::TestSetUpInBaseClass::test_a_thing" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff fc1ef55adc7e0c8866...
179
getmoto__moto-4853
diff --git a/moto/ec2/exceptions.py b/moto/ec2/exceptions.py --- a/moto/ec2/exceptions.py +++ b/moto/ec2/exceptions.py @@ -49,6 +49,11 @@ def __init__(self, dhcp_options_id): ) +class InvalidRequest(EC2ClientError): + def __init__(self): + super().__init__("InvalidRequest", "The request received ...
diff --git a/tests/test_ec2/test_instances.py b/tests/test_ec2/test_instances.py --- a/tests/test_ec2/test_instances.py +++ b/tests/test_ec2/test_instances.py @@ -1,4 +1,4 @@ -from botocore.exceptions import ClientError +from botocore.exceptions import ClientError, ParamValidationError import pytest from unittest i...
2022-02-11 20:45:57
EC2 run_instances BlockDeviceMapping missing support for NoDevice In [FireSim](https://fires.im/) we use an AMI that by default has two volumes. We only need one of them and thus make use of the `NoDevice` property of [`BlockDeviceMapping`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping....
getmoto/moto
2ec1a0477888d5dcc4f2cde95bc6c9502f7762d6
3.0
[ "tests/test_ec2/test_instances.py::test_modify_instance_attribute_security_groups_boto3", "tests/test_ec2/test_instances.py::test_run_instance_with_security_group_id_boto3", "tests/test_ec2/test_instances.py::test_get_instances_filtering_by_state_boto3", "tests/test_ec2/test_instances.py::test_modify_delete_o...
[ "tests/test_ec2/test_instances.py::test_run_instance_with_block_device_mappings_using_no_device" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 2ec1a0477888d5dcc4...
182
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
11