diff options
author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-01-14 15:43:27 +0000 |
---|---|---|
committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-01-14 15:43:27 +0000 |
commit | 2607fa901699916c4825f145fa8a84f49b8524ff (patch) | |
tree | e211144ca488e24b1b00deda973b5f6bea482843 /tests/urls.py | |
parent | ac8d0a48157c4a53f971cf2450cb6c8ee6c05f36 (diff) | |
download | django-2607fa901699916c4825f145fa8a84f49b8524ff.tar.gz |
Fixed #21774 -- Isolate all test urls from eachother.
This (nearly) completes the work to isolate all the test modules from
each other. This is now more important as importing models from another
module will case PendingDeprecationWarnings if those modules are not in
INSTALLED_APPS. The only remaining obvious dependencies are:
- d.c.auth depends on d.c.admin (because of the is_admin flag to some
views), but this is not so important and d.c.admin is in
always_installed_apps
- test_client_regress depends on test_client. Eventually these should
become a single module, as the split serves no useful purpose.
Diffstat (limited to 'tests/urls.py')
-rw-r--r-- | tests/urls.py | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/tests/urls.py b/tests/urls.py index 1540e71e18..34e3afcb83 100644 --- a/tests/urls.py +++ b/tests/urls.py @@ -1,33 +1,8 @@ -from django.conf.urls import patterns, include +"""This urlconf exists because Django expects ROOT_URLCONF to exist. URLs +should be added within the test folders, and use TestCase.urls to set them. +This helps the tests remain isolated. +""" +from django.conf.urls import patterns -urlpatterns = patterns('', - # test_client urls - (r'^test_client/', include('test_client.urls')), - (r'^test_client_regress/', include('test_client_regress.urls')), - # File upload test views - (r'^file_uploads/', include('file_uploads.urls')), - - # Always provide the auth system login and logout views - (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}), - (r'^accounts/logout/$', 'django.contrib.auth.views.logout'), - - # test urlconf for {% url %} template tag - (r'^url_tag/', include('template_tests.urls')), - - # django built-in views - (r'^views/', include('view_tests.urls')), - - # test urlconf for middleware tests - (r'^middleware/', include('middleware.urls')), - - # admin widget tests - (r'widget_admin/', include('admin_widgets.urls')), - - # admin custom URL tests - (r'^custom_urls/', include('admin_custom_urls.urls')), - - # admin scripts tests - (r'^admin_scripts/', include('admin_scripts.urls')), - -) +urlpatterns = patterns('') |