Use boto stubber to stub out responses from the AWS Api, via the python patch.object functionality. Using the Nose testing framework.
Run example client to pull items from public s3 buckets and sts calls.
./read.py
Run unit tests
python3 -m nose
- Do a simple test with the s3 client using boto's stubber functionality
- Test a complex function that calls multiple AWS API's, by using patching side effects, returned in a serial array function. which may seem simpler, but may be more brittle if the order of the clients calls changes
- Test a complex function that calls multiple AWS API's, by using patching side effects, returned with an inline function. which may seem more complex, but may be less brittle if the order of the clients calls changes
References: