def test_ssmstore_invalid_value_handler(self, mock_client): self.stubber.add_response('get_parameters', self.invalid_get_parameters_response, self.expected_params) with self.stubber: try: handler(self.ssmkey) except ValueError: assert True
def test_ssmstore_handler(self, mock_client): self.stubber.add_response('get_parameters', self.get_parameters_response, self.expected_params) with self.stubber: value = handler(self.ssmkey) self.assertEqual(value, self.ssmvalue)
def test_ssmstore_handler_with_region(self, mock_client): self.stubber.add_response('get_parameters', self.get_parameters_response, self.expected_params) region = "us-east-1" temp_value = "%s@%s" % (region, self.ssmkey) with self.stubber: value = handler(temp_value) self.assertEqual(value, self.ssmvalue)