Ejemplo n.º 1
0
    def test_sanitize_data(self):
        from lambda_function import _sanitize_data

        resource_properties = {
            "ServiceToken": "lambda-fn-arn",
            "Resource": "AnonymousMetric",
            "SolutionId": "SO1234",
            "UUID": "some-uuid",
            "Region": "us-east-1",
            "Foo": "Bar",
        }

        expected_response = {"Region": "us-east-1", "Foo": "Bar"}

        actual_response = _sanitize_data(resource_properties)
        self.assertCountEqual(expected_response, actual_response)
    def test_sanitize_data(self):
        from lambda_function import _sanitize_data

        resource_properties = {
            'ServiceToken': 'lambda-fn-arn',
            'Resource': 'AnonymousMetric',
            'SolutionId': 'SO1234',
            'UUID': 'some-uuid',
            'Region': 'us-east-1',
            'Foo': 'Bar'
        }

        expected_response = {'Region': 'us-east-1', 'Foo': 'Bar'}

        actual_response = _sanitize_data(resource_properties)
        self.assertCountEqual(expected_response, actual_response)