From cefea566f855938a8fea1ebf98b632b73d1de1f0 Mon Sep 17 00:00:00 2001 From: Andrey Kislyuk Date: Mon, 24 Sep 2018 14:31:56 -0700 Subject: [PATCH] Simpler test http method getattr --- test/test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test.py b/test/test.py index 0588d55..dabc887 100644 --- a/test/test.py +++ b/test/test.py @@ -15,9 +15,8 @@ def __init__(self): self._gateway = LocalGateway(self._chalice_app, config) @functools.lru_cache(maxsize=64, typed=False) - def __getattr__(self, item): - item = item.upper() - return functools.partial(self.request, method=item) + def __getattr__(self, method): + return functools.partial(self.request, method=method.upper()) def request(self, path, headers={}, body={}, method="GET"): resp_obj = requests.Response()