From eb4ed07d943e98bc336075a32020c990bd5dbd0c Mon Sep 17 00:00:00 2001 From: Genaro Camele Date: Mon, 13 Oct 2025 16:36:35 -0300 Subject: [PATCH] Refine error message in ManyToManySourceSerializer test Updated the error message for ManyToManySourceSerializer to remove suggestion for default value to make the test work --- tests/test_serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_serializer.py b/tests/test_serializer.py index 4973c3f2c..ed8a74911 100644 --- a/tests/test_serializer.py +++ b/tests/test_serializer.py @@ -798,7 +798,7 @@ class TestWarningManyToMany(TestCase): "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 with pytest.raises(ValueError) as exc_info: