Skip to content

Commit

Permalink
Replace deprecated Pydantic method parse_obj()
Browse files Browse the repository at this point in the history
  • Loading branch information
lbianchi-lbl committed Jun 29, 2024
1 parent e20ebec commit a93cd66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/tests/app/routers/test_flowsheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 != ""


Expand All @@ -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
Expand Down

0 comments on commit a93cd66

Please sign in to comment.