diff options
| author | Igor Fernandes <igorkuivjogi@hotmail.com> | 2021-05-26 16:06:47 -0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-22 08:09:53 +0200 |
| commit | e85d9c02ad1ef8988c149bad905fbc5b98a38594 (patch) | |
| tree | 7b8ea1ce77cd94976343a05c0f33ee413087c407 /tests/urlpatterns_reverse | |
| parent | ee408309d2007ecec4f43756360bd855d424cbf6 (diff) | |
Fixed #32870 -- Improved error message when URLconf is empty.
Diffstat (limited to 'tests/urlpatterns_reverse')
| -rw-r--r-- | tests/urlpatterns_reverse/tests.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py index 7190023d3a..f2102c5304 100644 --- a/tests/urlpatterns_reverse/tests.py +++ b/tests/urlpatterns_reverse/tests.py @@ -271,8 +271,9 @@ class NoURLPatternsTests(SimpleTestCase): 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." + "appear to have any patterns in it. If you see the 'urlpatterns' " + "variable with valid patterns in the file then the issue is " + "probably caused by a circular import." ): getattr(resolver, 'url_patterns') @@ -1095,8 +1096,9 @@ class NoRootUrlConfTests(SimpleTestCase): def test_no_handler_exception(self): msg = ( "The included URLconf 'None' 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." + "in it. If you see the 'urlpatterns' variable with valid patterns " + "in the file then the issue is probably caused by a circular " + "import." ) with self.assertRaisesMessage(ImproperlyConfigured, msg): self.client.get('/test/me/') |
