mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #26022 -- Used context manager version of assertRaisesMessage in tests.
This commit is contained in:
@@ -384,8 +384,8 @@ class SelectDateWidgetTest(WidgetTest):
|
||||
""",
|
||||
)
|
||||
|
||||
self.assertRaisesMessage(ValueError, 'empty_label list/tuple must have 3 elements.',
|
||||
SelectDateWidget, years=('2014',), empty_label=('not enough', 'values'))
|
||||
with self.assertRaisesMessage(ValueError, 'empty_label list/tuple must have 3 elements.'):
|
||||
SelectDateWidget(years=('2014',), empty_label=('not enough', 'values'))
|
||||
|
||||
@override_settings(USE_L10N=True)
|
||||
@translation.override('nl')
|
||||
|
||||
Reference in New Issue
Block a user