Open MauriceHeinze opened 1 week ago
I have the same error, but sometimes it works and the mocking operation is working
@MauriceHeinze Based on the provided code I can't see anything wrong - but I also can't reproduce it like this.
Can you provide an MRE (Minimal Reproducible Example)? That would make debugging a little easier.
Summary: When using Moto 5.0.9 with Python 3 on macOS, the
put_item
function is trying to connect to the real AWS DynamoDB service instead of using the Moto mock despite using the @mock_aws decorator.The repository that int_repo is using uses boto3 to talk to DynamoDB.
What happens? The test is failing.
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the PutItem operation: Requested resource not found
What should happen? The test should pass, because dynamodb connects to the mocked up one.
Lambda to test:
Test: