We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa571ab commit 4fb7571Copy full SHA for 4fb7571
tests/test_serializer.py
@@ -191,8 +191,9 @@ def __init__(self):
191
serializer = ExampleSerializer(instance)
192
with pytest.raises(AttributeError) as exc_info:
193
serializer.data
194
- assert str(exc_info.value) == (
+ msg = str(exc_info.value)
195
+ assert msg.startswith(
196
"Got AttributeError when attempting to get a value for field `incorrect_name` on serializer `ExampleSerializer`.\n"
197
"The serializer field might be named incorrectly and not match any attribute or key on the `ExampleObject` instance.\n"
- "Original exception text was: ExampleObject instance has no attribute 'incorrect_name'."
198
+ "Original exception text was:"
199
)
0 commit comments