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.
response = json.loads(
            self.client.put(
                "{0}/functions/{1}/configuration".format(API_PATH_ROOT, self.FUNCTION_NAME),
                json=updated_config,
            ).get_data()
        )
        expected_response = {}
        expected_response["LastUpdateStatus"] = "Successful"
        expected_response["FunctionName"] = str(self.FUNCTION_NAME)
        expected_response["Runtime"] = str(self.RUNTIME)
        expected_response["CodeSize"] = self.CODE_SIZE
        expected_response["CodeSha256"] = self.CODE_SHA_256
        expected_response["Handler"] = self.HANDLER
        expected_response.update(updated_config)
        subset = {k: v for k, v in response.items() if k in expected_response.keys()}
        self.assertDictEqual(expected_response, subset)
        get_response = json.loads(
            self.client.get(
                "{0}/functions/{1}/configuration".format(API_PATH_ROOT, self.FUNCTION_NAME)
            ).get_data()
        )
        self.assertDictEqual(response, get_response)
    def test_java_options_empty_return_empty_value(self):
        lambda_executors.config.LAMBDA_JAVA_OPTS = ""
        result = lambda_executors.Util.get_java_opts()
        self.assertFalse(result)
    def test_java_options_with_only_memory_options(self):
        expected = "-Xmx512M"
        result = self.prepare_java_opts(expected)
        self.assertEqual(expected, result)