moto
moto copied to clipboard
A library that allows you to easily mock out tests based on AWS infrastructure.
Consider the following test code that will create a mock lambda that just returns some arbitrary value: ``` def get_mock_lambda(return_value: str): pfunc = """ def lambda_handler(event, context): return {} """.format(return_value.replace("\n",...
Please remove setuptools from install_requires in setup.py. When using tools that compile list of deployable packages setuptools will be inadvertantly included and when using well known tools like pip-tools to...
I have been trying to run the Multipart upload example against Moto from: https://docs.aws.amazon.com/AmazonS3/latest/dev/llJavaUploadFile.html Using the class UploadObjectMPULowLevelAPI. When calling completeMultipartUpload, I get an error response: com.amazonaws.services.s3.model.AmazonS3Exception: One or more...
Hi, The following code uploads a file to a mock S3 bucket using boto, and downloads the same file to the local disk using boto3. I apologize for bringing both...
The mock_batch_simple functionality is a great way to test integration with AWS batch, but it always sets the job status to SUCCEEDED. It would be great to parameterize this, so...
**What I expect to happen:** A BatchGetItem call to a moto dynamodb instance which would return > 16 MB of data should only return a partial result, with any unprocessed...
Hi, I'm trying to mock route53 and test my function, however, I noticed that moto does not raise an exception that real route53 does. This does apply for CREATE and...
Hi. Thank you very much for this helpful library. Would it be possible to add Python type annoations to the source code of this library? Or [MyPy typing stubs](https://mypy.readthedocs.io/en/stable/stubs.html)? The...
Moto version's tried master branch and 3.1.4 ```python @mock_sts def test_sts_account_override(monkeypatch): dummy_account_id = "MEMEMEMEME" monkeypatch.setenv("MOTO_ACCOUNT_ID", dummy_account_id) os_account_id = os.environ.get("MOTO_ACCOUNT_ID") os_account_id.should.equal(dummy_account_id) client = boto3.client("sts", region_name="us-west-2") resp = client.get_caller_identity() resp["Account"].should.equal(dummy_account_id) ``` this...