summaryrefslogtreecommitdiff
path: root/docs/topics/testing.txt
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-09-02 03:40:42 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-09-02 03:40:42 +0000
commit64a94691277db17e87614f125d8da78a9995076b (patch)
tree8850007d024ada1901a8965c01e7c6f74ebe0172 /docs/topics/testing.txt
parentc435975cc779a4549591a1c2b32e91f409c33757 (diff)
Fixed #8753: converted "new in ..." callouts to proper Sphinx "versionadded/versionchanged" directives. Thanks to Marc Fargas for all the heavy lifting here.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/testing.txt')
-rw-r--r--docs/topics/testing.txt31
1 files changed, 19 insertions, 12 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index bc50513611..0916f52388 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -257,7 +257,10 @@ with this command::
Note that we used ``animals``, not ``myproject.animals``.
-**New in Django development version:** If you use unit tests, as opposed to
+.. versionadded:: 1.0
+ You can now choose which test to run.
+
+If you use unit tests, as opposed to
doctests, you can be even *more* specific in choosing which tests to execute.
To run a single test case in an application (for example, the
``AnimalTestCase`` described in the "Writing unit tests" section), add the
@@ -293,7 +296,9 @@ etc. The test database is created by the user specified by
:setting:`DATABASE_USER`, so you'll need to make sure that the given user
account has sufficient privileges to create a new database on the system.
-**New in Django development version:** For fine-grained control over the
+.. versionadded:: 1.0
+
+For fine-grained control over the
character encoding of your test database, use the
:setting:`TEST_DATABASE_CHARSET` setting. If you're using MySQL, you can also
use the :setting:`TEST_DATABASE_COLLATION` setting to control the particular
@@ -541,7 +546,7 @@ arguments at time of construction:
.. method:: Client.login(**credentials)
- **New in Django development version**
+ .. versionadded:: 1.0
If your site uses Django's :ref:`authentication system<topics-auth>`
and you deal with logging in users, you can use the test client's
@@ -581,7 +586,7 @@ arguments at time of construction:
.. method:: Client.logout()
- **New in Django development version**
+ .. versionadded:: 1.0
If your site uses Django's :ref:`authentication system<topics-auth>`,
the ``logout()`` method can be used to simulate the effect of a user
@@ -729,7 +734,7 @@ additions.
Default test client
~~~~~~~~~~~~~~~~~~~
-**New in Django development version**
+.. versionadded:: 1.0
.. attribute:: TestCase.client
@@ -830,7 +835,7 @@ or by the order of test execution.
URLconf configuration
~~~~~~~~~~~~~~~~~~~~~
-**New in Django development version**
+.. versionadded:: 1.0
.. attribute:: TestCase.urls
@@ -865,7 +870,7 @@ URLconf for the duration of the test case.
Emptying the test outbox
~~~~~~~~~~~~~~~~~~~~~~~~
-**New in Django development version**
+.. versionadded:: 1.0
If you use Django's custom ``TestCase`` class, the test runner will clear the
contents of the test e-mail outbox at the start of each test case.
@@ -875,7 +880,7 @@ For more detail on e-mail services during tests, see `E-mail services`_.
Assertions
~~~~~~~~~~
-**New in Django development version**
+.. versionadded:: 1.0
As Python's normal ``unittest.TestCase`` class implements assertion methods
such as ``assertTrue`` and ``assertEquals``, Django's custom ``TestCase`` class
@@ -929,7 +934,7 @@ applications:
E-mail services
---------------
-**New in Django development version**
+.. versionadded:: 1.0
If any of your Django views send e-mail using :ref:`Django's e-mail
functionality <topics-email>`, you probably don't want to send e-mail each time
@@ -1021,7 +1026,7 @@ that can be executed from Python code.
Defining a test runner
----------------------
-**New in Django development version**
+.. versionadded:: 1.0
.. currentmodule:: django.test.simple
@@ -1096,11 +1101,13 @@ provides some utilities that can be useful during testing.
* If autoclobber is ``True``, the database will be destroyed without
consulting the user.
+ Returns the name of the test database that it created.
+
``create_test_db()`` has the side effect of modifying
``settings.DATABASE_NAME`` to match the name of the test database.
- **New in Django development version:** This function returns the name of
- the test database that it created.
+ .. versionchanged:: 1.0
+ ``create_test_db()`` now returns the name of the test database.
.. function:: destroy_test_db(old_database_name, verbosity=1)