While a lambda is still processing (archive unpacking etc), the lambda state should be set to "Pending" (currently "Active") and invocations to that lambda should fail (currently, it can end up in a inconsistent state in this case, like lambdas being executed without layers).

Lambda state should reflect the current internal state, and invocations should fail if not active.
def test_create_event_source_mapping(self):
        self.client.post(
            "{0}/event-source-mappings/".format(API_PATH_ROOT),
            data=json.dumps(
                {
                    "FunctionName": "test-lambda-function",
                    "EventSourceArn": TEST_EVENT_SOURCE_ARN,
                }
            ),
        )
        listResponse = self.client.get("{0}/event-source-mappings/".format(API_PATH_ROOT))
        listResult = json.loads(listResponse.get_data())
        eventSourceMappings = listResult.get("EventSourceMappings")
        self.assertEqual(1, len(eventSourceMappings))
        self.assertEqual("Enabled", eventSourceMappings[0]["State"])
    def test_create_event_source_mapping_self_managed_event_source(self):
        self.client.post(
            "{0}/event-source-mappings/".format(API_PATH_ROOT),
            data=json.dumps(
                {
                    "FunctionName": "test-lambda-function",
                    "Topics": ["test"],
                    "SourceAccessConfigurations": [
                        {
                            "Type": "SASL_SCRAM_512_AUTH",
                            "URI": TEST_SECRETSMANANAGER_EVENT_SOURCE_ARN,
                        }
                    ],
                    "SelfManagedEventSource": {
                        "Endpoints": {"KAFKA_BOOTSTRAP_SERVERS": ["127.0.0.1:9092"]}