mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2024-11-23 23:41:06 +03:00
fixed json payload
This commit is contained in:
parent
e33024db86
commit
a6b2f2a942
@ -108,6 +108,7 @@ def test_auth_v1_origin():
|
|||||||
|
|
||||||
def test_auth_v1_origin_malformed_json():
|
def test_auth_v1_origin_malformed_json():
|
||||||
import re
|
import re
|
||||||
|
import json
|
||||||
|
|
||||||
# see oscar.krause/fastapi-dls#1
|
# see oscar.krause/fastapi-dls#1
|
||||||
payload = """{
|
payload = """{
|
||||||
@ -133,6 +134,7 @@ def test_auth_v1_origin_malformed_json():
|
|||||||
assert replaced == '{"environment": {"fingerprint": {"mac_address_list": ["ff:ff:ff:ff:ff:ff"]}}'
|
assert replaced == '{"environment": {"fingerprint": {"mac_address_list": ["ff:ff:ff:ff:ff:ff"]}}'
|
||||||
|
|
||||||
payload = re.sub(regex, r'\1"\2', payload)
|
payload = re.sub(regex, r'\1"\2', payload)
|
||||||
|
payload = json.loads(payload)
|
||||||
#
|
#
|
||||||
|
|
||||||
response = client.post('/auth/v1/origin', json=payload)
|
response = client.post('/auth/v1/origin', json=payload)
|
||||||
|
Loading…
Reference in New Issue
Block a user