1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #21977 -- Deprecated SimpleTestCase.urls

This commit is contained in:
Anubhav Joshi
2014-04-05 11:34:46 +05:30
committed by Tim Graham
parent d2f4553d70
commit cd914e31c9
73 changed files with 337 additions and 295 deletions

View File

@@ -20,6 +20,8 @@ about each item can often be found in the release notes of two versions prior.
* Support for the ``prefix`` argument to
``django.conf.urls.i18n.i18n_patterns()`` will be removed.
* ``SimpleTestCase.urls`` will be removed.
.. _deprecation-removed-in-1.9:
1.9

View File

@@ -256,6 +256,14 @@ Updating your code is as simple as ensuring that ``urlpatterns`` is a list of
url('^other/$', views.otherview),
]
``django.test.SimpleTestCase.urls``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The attribute :attr:`SimpleTestCase.urls <django.test.SimpleTestCase.urls>`
for specifying URLconf configuration in tests has been deprecated and will be
removed in Django 2.0. Use :func:`@override_settings(ROOT_URLCONF=...)
<django.test.override_settings>` instead.
``prefix`` argument to :func:`~django.conf.urls.i18n.i18n_patterns`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -961,6 +961,11 @@ URLconf configuration
.. attribute:: SimpleTestCase.urls
.. deprecated:: 1.8
Use ``@override_settings(ROOT_URLCONF=...)`` instead for URLconf
configuration.
If your application provides views, you may want to include tests that use the
test client to exercise those views. However, an end user is free to deploy the
views in your application at any URL of their choosing. This means that your