boto3 stubber should allow SQS resource to be mocked #2978
Labels
feature-request
This issue requests a feature.
response-requested
Waiting on additional info and feedback.
stubber
Describe the feature
The boto3 Stubber can be used to add responses to boto3 client calls, which can then be used to mock API calls within pytest.
Using the boto3 Stubber to mock
boto3.resource
instead ofboto3.client
is not a well-documented or perhaps supported feature.This code:
Raises:
If there is any way to mock
boto3.resource("sqs").get_queue_by_name()
that would be great.Use Case
I would like to use pytest to verify the inputs and outputs of some boto3 SDK calls within my codebase.
Proposed Solution
Some people have mentioned a workaround on #1125 - but a proper and documented solution would be great.
Other Information
No response
Acknowledgements
SDK version used
1.29.163
Environment details (OS name and version, etc.)
Any
The text was updated successfully, but these errors were encountered: