From a93cd66f5fc67434a2e3e823f2e14ae4be53faae Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Sat, 29 Jun 2024 16:33:31 -0500 Subject: [PATCH] Replace deprecated Pydantic method parse_obj() --- backend/tests/app/routers/test_flowsheets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/tests/app/routers/test_flowsheets.py b/backend/tests/app/routers/test_flowsheets.py index 4f2c2903..92921217 100644 --- a/backend/tests/app/routers/test_flowsheets.py +++ b/backend/tests/app/routers/test_flowsheets.py @@ -82,7 +82,7 @@ def test_get_all(client): data = body["flowsheet_list"] for item in data: # validates the result object, too - info = fm.FlowsheetInfo.parse_obj(item) + info = fm.FlowsheetInfo.model_validate(item) assert info.name != "" @@ -93,7 +93,7 @@ def test_get_config(client, flowsheet_id): assert response.status_code == 200, body # make sure it's a non-empty valid response assert body != {} - fs_exp = FlowsheetExport.parse_obj(body) + fs_exp = FlowsheetExport.model_validate(body) assert fs_exp.name != "" # this time build the model, make sure there is content