예제 #1
0
 def test_setup_lambda_route(self):
     name        = 'api-key-generator-for-shopify'
     lambda_name = 'gw_bot_lambdas_gw_store_create_api_gw_api_key'
     rest_api    = Rest_API(name).create()
     rest_api.add_method_lambda('/','GET',lambda_name)
     rest_api.deploy()
     self.result = rest_api.test_method('/','GET')
예제 #2
0
 def test_setup_lambda_route(self):  # will create a {proxy+} integration
     rest_api = Rest_API(self.api_name).create()
     parent_id = rest_api.resource_id('/')
     if not rest_api.api_gateway.rest_api_exists(rest_api.id()):
         rest_api.api_gateway.resource_create(
             rest_api.id(), parent_id, '{proxy+}')
     self.result = rest_api.add_method_lambda(
         '/', 'ANY', self.lambda_name)  # need to add both
     self.result = rest_api.add_method_lambda(
         '/{proxy+}', 'ANY', self.lambda_name)  # since this one wasn't catching the root requests
     rest_api.deploy()