mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #26022 -- Used context manager version of assertRaisesMessage in tests.
This commit is contained in:
parent
3d0dcd7f5a
commit
253adc2b8a
21 changed files with 584 additions and 566 deletions
|
@ -252,13 +252,13 @@ class NoURLPatternsTests(SimpleTestCase):
|
|||
"""
|
||||
resolver = RegexURLResolver(r'^$', settings.ROOT_URLCONF)
|
||||
|
||||
self.assertRaisesMessage(
|
||||
with self.assertRaisesMessage(
|
||||
ImproperlyConfigured,
|
||||
"The included URLconf 'urlpatterns_reverse.no_urls' does not "
|
||||
"appear to have any patterns in it. If you see valid patterns in "
|
||||
"the file then the issue is probably caused by a circular import.",
|
||||
getattr, resolver, 'url_patterns'
|
||||
)
|
||||
"the file then the issue is probably caused by a circular import."
|
||||
):
|
||||
getattr(resolver, 'url_patterns')
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='urlpatterns_reverse.urls')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue