Tests#

Base Class for Test Cases#

class core_aws.tests.base.BaseAwsTestCase(*args, **kwargs)[source]#

Bases: BaseTestCase

Base class for Test Cases related to AWS and boto3

aws_patcher = <unittest.mock._patch object>#
aws_client_mock = None#
classmethod setUpClass() None[source]#

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass() None[source]#

Hook method for deconstructing the class fixture after running all tests in the class.

static _make_api_call(_operation_name: str, _api_params: Any) Any[source]#

Each class can implement the response depending on the services they are patching.

static sample_context() LambdaContext[source]#
static generate_error(service: str = 'ssm', region_name: str = 'us-east-1', operation_name: str = 'GetParameter', error_code: str = 'ParameterNotFound', error_message: str = 'The parameter was not found.') Exception[source]#

Generate a botocore client exception for testing.

_classSetupFailed = False#
_class_cleanups = []#