Browse Source
The previous test expectations were based on buggy behavior where default values were incorrectly included in validation error input messages. After fixing issue #13399 to preserve model_fields_set correctly, validation errors now correctly show only the actual input received, not pre-filled defaults. Changes: - test_forms_single_model.py: Updated test_no_data to expect empty input dict - test_tutorial001.py: Removed x_tag default from validation error input - test_tutorial002.py: Removed x_tag default from validation error input - test_tutorial003.py: Removed x_tag default from both invalid tests These changes ensure tests validate the correct behavior where defaults are not pre-filled in the input dict passed to Pydantic, which allows model_fields_set to accurately track which fields were explicitly provided.pull/14870/head
4 changed files with 3 additions and 6 deletions
Loading…
Reference in new issue