summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-08-18 12:07:13 -0400
committerTim Graham <timograham@gmail.com>2015-09-23 19:31:09 -0400
commit1392aff440bc8be26ac09062265269a0414d96d1 (patch)
tree7907ec2fc18b98bd1adde099c7ac2dbe7ae9c7b5 /docs
parent5c62887d82b1d886c97eb2d4ed3f596b0e6bfebb (diff)
Refs #21977 -- Removed SimpleTestCase.urls per deprecation timeline.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.8.txt8
-rw-r--r--docs/topics/testing/tools.txt32
2 files changed, 6 insertions, 34 deletions
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index d13abcabfc..1e0c233cba 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -1307,10 +1307,10 @@ Built-in template context processors have been moved to
``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 1.10. Use :func:`@override_settings(ROOT_URLCONF=...)
-<django.test.override_settings>` instead.
+The attribute ``SimpleTestCase.urls`` for specifying URLconf configuration in
+tests has been deprecated and will be removed in Django 1.10. Use
+:func:`@override_settings(ROOT_URLCONF=...) <django.test.override_settings>`
+instead.
``prefix`` argument to :func:`~django.conf.urls.i18n.i18n_patterns`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 52a00b7ded..800f083765 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -639,7 +639,6 @@ functionality like:
* The ability to run tests with :ref:`modified settings <overriding-settings>`.
* Using the :attr:`~SimpleTestCase.client` :class:`~django.test.Client`.
-* Custom test-time :attr:`URL maps <SimpleTestCase.urls>`.
If you need any of the other more complex and heavyweight Django-specific
features like:
@@ -1080,39 +1079,12 @@ using multiple databases and set :attr:`multi_db=True
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
tests can't rely upon the fact that your views will be available at a
-particular URL.
-
-In order to provide a reliable URL space for your test,
-``django.test.*TestCase`` classes provide the ability to customize the URLconf
-configuration for the duration of the execution of a test suite. If your
-``*TestCase`` instance defines an ``urls`` attribute, the ``*TestCase`` will use
-the value of that attribute as the :setting:`ROOT_URLCONF` for the duration
-of that test.
-
-For example::
-
- from django.test import TestCase
-
- class TestMyViews(TestCase):
- urls = 'myapp.test_urls'
-
- def test_index_page_view(self):
- # Here you'd test your view using ``Client``.
- call_some_test_code()
-
-This test case will use the contents of ``myapp.test_urls`` as the
-URLconf for the duration of the test case.
+particular URL. Decorate your test class or test method with
+``@override_settings(ROOT_URLCONF=...)`` for URLconf configuration.
.. _emptying-test-outbox: