Refine error message in ManyToManySourceSerializer test

Updated the error message for ManyToManySourceSerializer to remove suggestion for default value to make the test work
This commit is contained in:
Genaro Camele 2025-10-13 16:36:35 -03:00 committed by GitHub
parent e87a82b3fc
commit eb4ed07d94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -798,7 +798,7 @@ class TestWarningManyToMany(TestCase):
"name": "Invalid Example", "name": "Invalid Example",
}) })
error_msg = "The field 'targets' on serializer 'ManyToManySourceSerializer' is a ManyToMany field and cannot have a default value of None. Please set an appropriate default value, such as an empty list, or remove the default." error_msg = "The field 'targets' on serializer 'ManyToManySourceSerializer' is a ManyToMany field and cannot have a default value of None."
# Calls to get_fields() should raise a ValueError # Calls to get_fields() should raise a ValueError
with pytest.raises(ValueError) as exc_info: with pytest.raises(ValueError) as exc_info: