#24553: Pass application list to more admin views
-------------------------------+------------------------------------
Reporter: rm_ | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by timgraham):
There appears to be leakage of the URLs from `tests/auth_tests/urls.py`
into tests that use `ROOT_URLCONF='auth_tests.test_urls_admin'`. Couldn't
find the reason for this but traced it as far as
[https://github.com/django/django/blob/1046c8afecf719eee5a2aaa28b001e731f94100b/django/core/urlresolvers.py#L405-L410
RegexURLResolver.urlconf_module] which shows leakage with this version:
{{{
#!python
@property
def urlconf_module(self):
if isinstance(self.urlconf_name, six.string_types):
module = import_module(self.urlconf_name)
patterns = getattr(module, "urlpatterns")
print('---- %s ---- %s ' % (self.urlconf_name, patterns))
return module
else:
return self.urlconf_name
}}}
and:
`$ ./tests/runtests.py
auth_tests.test_views.ChangePasswordTest.test_password_change_fails_with_invalid_old_password
auth_tests.test_views.ChangelistTests.test_user_change_password`
While the second test is executing, you'll see the URLs from the first
test.
Because the default admin site is leaking into the second test, its logout
view is being called (`AdminSite.name` is 'admin' instead of
'auth_test_admin').
--
Ticket URL: <https://code.djangoproject.com/ticket/24553#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.d0140651279ca142b36b06ec4d8bdec3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.