From 08364dfa56b5af79f40b1ecc0e16bfb7b2a8bbfc Mon Sep 17 00:00:00 2001 From: Peter Staar Date: Mon, 26 Aug 2024 20:32:23 +0200 Subject: [PATCH] replaced deprecated json function with model_dump_json Signed-off-by: Peter Staar --- tests/test_toplevel_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_toplevel_functions.py b/tests/test_toplevel_functions.py index b708b0b1..a8eb1bb1 100644 --- a/tests/test_toplevel_functions.py +++ b/tests/test_toplevel_functions.py @@ -101,7 +101,7 @@ def test_conversions(): if GENERATE: with open(json_path, "w") as fw: - fw.write(doc_pred_json.json()) + fw.write(doc_pred_json.model_dump_json()()) with open(md_path, "w") as fw: fw.write(doc_pred_md) @@ -114,7 +114,7 @@ def test_conversions(): with open(md_path, "r") as fr: doc_true_md = "".join(fr.readlines()) - doc_ = json.loads(doc_pred_json.json()) + doc_ = json.loads(doc_pred_json.model_dump_json()) # print(json.dumps(doc_, indent=2)) assert verify_json(