Skip to content

Commit

Permalink
Simpler test http method getattr
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk authored Sep 24, 2018
1 parent afd4734 commit cefea56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cefea56

Please sign in to comment.