[python] Upgrade tests (#7711)

* [python] Upgrade tests

* Fix latest sanic asgi

* Bump flask

* Change requirements.txt to Pipfile

* Fix dev test

* Use verbose requirements.txt

* Flip requirements
This commit is contained in:
Steven
2022-04-25 12:01:49 -04:00
committed by GitHub
parent 57916bb712
commit bae2a2e4df
11 changed files with 296 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ __vc_variables = dir(__vc_module)
def format_headers(headers, decode=False):
keyToList = {}
for key, value in headers.items():
if decode:
if decode and 'decode' in dir(key) and 'decode' in dir(value):
key = key.decode()
value = value.decode()
if key not in keyToList:
@@ -102,7 +102,7 @@ elif 'app' in __vc_variables:
if isinstance(s, str):
s = s.encode(charset)
return s.decode("latin1", errors)
def vc_handler(event, context):
payload = json.loads(event['body'])