It looks like a duplicate of old issue https://github.com/localstack/localstack/issues/78
But now it's reproducible for me with the latest version of LocalStack. 
import base64
import re
import json
import unittest
from jsonpatch import apply_patch
from requests.models import Response
from xml.dom.minidom import parseString
from requests.structures import CaseInsensitiveDict
from localstack.config import INBOUND_GATEWAY_URL_PATTERN, DEFAULT_REGION
from localstack.constants import TEST_AWS_ACCOUNT_ID
from localstack.utils import testutil
from localstack.utils.aws import aws_stack
from localstack.utils.common import to_str, load_file, json_safe, clone
from localstack.utils.common import safe_requests as requests
from localstack.services.generic_proxy import GenericProxy, ProxyListener
from localstack.services.awslambda.lambda_api import (
    LAMBDA_RUNTIME_PYTHON27, add_event_source)
from localstack.services.apigateway.helpers import (
    get_rest_api_paths, get_resource_for_path, connect_api_gateway_to_sqs)
from .test_lambda import TEST_LAMBDA_PYTHON, TEST_LAMBDA_LIBS