From 28ae8f7cc0af943f3bcd96904bc3a435eee5ad57 Mon Sep 17 00:00:00 2001 From: boon Date: Tue, 9 May 2023 00:30:55 +0800 Subject: [PATCH] fix property raised instead of returned. --- 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 5865fb1cdc36e..8cab27096b657 100644 --- a/src/lightning/app/api/http_methods.py +++ b/src/lightning/app/api/http_methods.py @@ -71,7 +71,7 @@ def receive(self): @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 808989b4c7916..b6302f8e3fb7f 100644 --- a/tests/tests_app/core/test_lightning_api.py +++ b/tests/tests_app/core/test_lightning_api.py @@ -485,6 +485,7 @@ def request(self, config: InputRequestModel, request: Request) -> OutputRequestM assert request.body() assert request.json() assert request.headers + assert request.method return OutputRequestModel(name=config.name, counter=self.counter) def configure_api(self):