Check call args for empty string with Form

This commit is contained in:
Yurii Motov 2026-02-05 09:08:03 +01:00
parent e1adc4a739
commit 3441e14197
1 changed files with 15 additions and 6 deletions

View File

@ -175,8 +175,11 @@ def test_nullable_required_pass_empty_str(path: str):
)
assert mock_convert.call_count == 3, "Validator should be called for each field"
# TODO: Check call args ?
assert mock_convert.call_args_list == [
(""), # int_val
(""), # str_val
(["0"]), # list_val
]
assert response.status_code == 200, response.text
assert response.json() == {
"int_val": None,
@ -360,8 +363,11 @@ def test_nullable_non_required_pass_empty_str(path: str):
)
assert mock_convert.call_count == 3, "Validator should be called for each field"
# TODO: Check call args ?
assert mock_convert.call_args_list == [
(""), # int_val
(""), # str_val
(["0"]), # list_val
]
assert response.status_code == 200, response.text
assert response.json() == {
"int_val": None,
@ -554,8 +560,11 @@ def test_nullable_with_non_null_default_pass_empty_str(path: str):
)
assert mock_convert.call_count == 3, "Validator should be called for each field"
# TODO: Check call args ?
assert mock_convert.call_args_list == [
(""), # int_val
(""), # str_val
(["0"]), # list_val
]
assert response.status_code == 200, response.text
assert response.json() == {
"int_val": None,