Pydantic v2 migration

This commit is contained in:
grossmj committed 2023-08-04 18:20:06 +10:00
1 parent 11f51b3809
commit 9c456532d0
46 files changed
+221 -277

No files matched your search

+2 -2
View File
@@ -74,7 +74,7 @@ def test_server_settings_to_list(tmpdir, setting: str, value: str, result: str):
}
})
assert config.settings.dict(exclude_unset=True)["Server"][setting] == result
assert config.settings.model_dump(exclude_unset=True)["Server"][setting] == result
def test_reload(tmpdir):
@@ -109,7 +109,7 @@ def test_server_password_hidden():
"settings, exception_expected",
(
({"protocol": "https1"}, True),
({"console_start_port_range": 15000}, False),
({"console_start_port_range": 15000, "console_end_port_range": 20000}, False),
({"console_start_port_range": 0}, True),
({"console_start_port_range": 68000}, True),
({"console_end_port_range": 15000}, False),