From 1dbc5158d936b88fd532cc1e895611e85815de0f Mon Sep 17 00:00:00 2001 From: xucong053 <43516634+xucong053@users.noreply.github.com> Date: Tue, 13 Jul 2021 22:02:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Aadd=20list2json=20for=20better=20di?= =?UTF-8?q?splay?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- httprunner/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httprunner/client.py b/httprunner/client.py index 1832ed95..71f228f9 100644 --- a/httprunner/client.py +++ b/httprunner/client.py @@ -33,7 +33,7 @@ def get_req_resp_record(resp_obj: Response) -> ReqRespData: def log_print(req_or_resp, r_type): msg = f"\n================== {r_type} details ==================\n" for key, value in req_or_resp.dict().items(): - if isinstance(value, dict): + if isinstance(value, dict) or isinstance(value, list): value = json.dumps(value, indent=4, ensure_ascii=False) msg += "{:<8} : {}\n".format(key, value)