* ELBv2 - ListenerRule condition validation
- ListenerRule condition model now uses upper case field names that
match input params for boto and CloudFormation.
- BaseResponse._get_params() introduced to make it easier to deal
with the querystring input params.
* Py3: use unittest.mock instead of mock
* noqa
* oops
* just pull in patch()
* ignore RuntimeError when stopping patch
* ignore RuntimeError from default_session_mock.stop()
* Address `boto` deprecation warnings
This commit eliminates the following warning:
../boto/ec2/connection.py:582:
PendingDeprecationWarning: The current get_all_instances implementation will be replaced with get_all_reservations.
`boto` isn't likely to ever make good on this warning, but doing the replacement will
declutter the `moto` test output.
* Remove `invoke_lambda` tracebacks from unit test logging
If an exception is encountered, the details are returned in the response payload.
Printing the traceback was just adding noise to the pytest output.
* Use known AMIs in unit tests
This commit eliminates the following warning in the pytest output:
`PendingDeprecationWarning: Could not find AMI with image-id:ami-123456, in the near future this will cause an error.`
Known, pre-loaded AMI image ids are used instead of random ids that don't actually
exist in the moto backend. The integrity of the tests is unaffected by this change.
A test has been added to provide explicit coverage of the PendingDeprecationWarning
raised when an invalid AMI image id is passed to moto.
This unblocks requests to other websites with requests while Moto
is activated. It also adds a wildcard for AWS services to still
ensure no accidental requests are made for unmocked services
This revision includes:
- A handler for requests for which content-type is JSON (from boto3).
- A decorator (generate_boto3_response) to convert XML responses to
JSON (for boto3). This way, existing response templates for boto can
be shared for generating boto3 response.
- Utility class/functions to use botocore's service specification data
(accessible under botocore.data) for type casting, from query
parameters to Python objects and XML to JSON.
- Updates to response handlers/models to cover more EMR end points and
mockable parameters