From d7b668eb94b3d224e0e6d1fb396b1f3159d6bcc3 Mon Sep 17 00:00:00 2001 From: BOON KIAT <49676590+bkiat1123@users.noreply.github.com> Date: Tue, 9 May 2023 06:37:30 +0800 Subject: [PATCH] Fix property raised instead of returned (#17595) --- src/lightning/app/api/http_methods.py | 2 +- tests/tests_app/core/test_lightning_api.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lightning/app/api/http_methods.py b/src/lightning/app/api/http_methods.py index 5865fb1cdc..8cab27096b 100644 --- a/src/lightning/app/api/http_methods.py +++ b/src/lightning/app/api/http_methods.py @@ -71,7 +71,7 @@ class _FastApiMockRequest: @property def method(self): - raise self._method + return self._method @property def headers(self): diff --git a/tests/tests_app/core/test_lightning_api.py b/tests/tests_app/core/test_lightning_api.py index 808989b4c7..b6302f8e3f 100644 --- a/tests/tests_app/core/test_lightning_api.py +++ b/tests/tests_app/core/test_lightning_api.py @@ -485,6 +485,7 @@ class FlowAPI(LightningFlow): assert request.body() assert request.json() assert request.headers + assert request.method return OutputRequestModel(name=config.name, counter=self.counter) def configure_api(self):