"""Test API Gateway functions."""
from unittest import mock

from foremast.awslambda.api_gateway_event.api_gateway_event import APIGateway


@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.boto3')
@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.get_details')
@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.get_env_credential')
@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.get_properties')
def test_create_resource(get_properties, get_env_credential, get_details, boto3):
    """Check creating API Resource."""
    test_rules = {'api_name': 1, 'method': 'PUT'}

    test = APIGateway(rules=test_rules)
    test.api_id = ''
    test.create_resource()

    test.client.create_resource.assert_called_with(restApiId='', parentId='', pathPart='/')

@@ -133,16 +133,575 @@
 ateway%0A%0A
+TEST_RULES = %7B'api_name': 1, 'method': 'PUT'%7D%0A%0A%0A@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.boto3')%0A@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.get_details')%0A@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.get_env_credential')%0A@mock.patch('foremast.awslambda.api_gateway_event.api_gateway_event.get_properties')%0Adef test_apigateway(get_properties, get_env_credential, get_details, boto3):%0A    %22%22%22Check basic object initialization.%22%22%22%0A    test = APIGateway(rules=TEST_RULES)%0A    assert test%0A%0A
 %0A@mock.p
@@ -1150,59 +1150,8 @@
 %22%22%22%0A
-    test_rules = %7B'api_name': 1, 'method': 'PUT'%7D%0A%0A
     
@@ -1178,18 +1178,18 @@
 les=
-test_rules
+TEST_RULES
 )%0A  

Add basic APIGateway init