mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Fix test for python2/3 compat
This commit is contained in:
parent
aa571abb20
commit
4fb757146a
|
@ -191,8 +191,9 @@ class TestIncorrectlyConfigured:
|
|||
serializer = ExampleSerializer(instance)
|
||||
with pytest.raises(AttributeError) as exc_info:
|
||||
serializer.data
|
||||
assert str(exc_info.value) == (
|
||||
msg = str(exc_info.value)
|
||||
assert msg.startswith(
|
||||
"Got AttributeError when attempting to get a value for field `incorrect_name` on serializer `ExampleSerializer`.\n"
|
||||
"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'."
|
||||
"Original exception text was:"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user