mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Used assertRaisesMessage() to test Django's error messages.
This commit is contained in:
@@ -222,7 +222,7 @@ class UtilsTests(SimpleTestCase):
|
||||
"article"
|
||||
)
|
||||
|
||||
with self.assertRaises(AttributeError):
|
||||
with self.assertRaisesMessage(AttributeError, "Unable to lookup 'unknown' on Article"):
|
||||
label_for_field("unknown", Article)
|
||||
|
||||
def test_callable(obj):
|
||||
|
||||
Reference in New Issue
Block a user