summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Hurley <gabehr@gmail.com>2011-08-18 22:31:32 +0000
committerGabriel Hurley <gabehr@gmail.com>2011-08-18 22:31:32 +0000
commit41b31b4d09c238d723e951dc0233bae747cfb8e9 (patch)
treec2251051ce212d4a67ba5d64edad6474ea2bdf0b /docs
parentb825680df804067e70fb25f7cc3f5e4db9588d41 (diff)
Fixed #16608 -- Clarified the description of the destroy_test_db method and cleaned up various other reST/Sphinx-related bits in the testing docs. Thanks to Stan for the report and Julien for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index c5a18f8680..7bef4cb52f 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -1278,6 +1278,7 @@ already have some data in your database. See the :djadmin:`dumpdata
documentation<dumpdata>` for more details.
.. note::
+
If you've ever run :djadmin:`manage.py syncdb<syncdb>`, you've
already used a fixture without even knowing it! When you call
:djadmin:`syncdb` in the database for the first time, Django
@@ -1919,10 +1920,12 @@ utility methods in the ``django.test.utils`` module.
magic hooks into the template system and restoring normal email
services.
+.. currentmodule:: django.db.connection.creation
+
The creation module of the database backend (``connection.creation``)
also provides some utilities that can be useful during testing.
-.. function:: create_test_db(verbosity=1, autoclobber=False)
+.. function:: create_test_db([verbosity=1, autoclobber=False])
Creates a new test database and runs ``syncdb`` against it.
@@ -1944,10 +1947,11 @@ also provides some utilities that can be useful during testing.
:setting:`NAME` in :setting:`DATABASES` to match the name of the test
database.
-.. function:: destroy_test_db(old_database_name, verbosity=1)
+.. function:: destroy_test_db(old_database_name, [verbosity=1])
- Destroys the database whose name is in stored in :setting:`NAME` in the
- :setting:`DATABASES`, and sets :setting:`NAME` to use the
- provided name.
+ Destroys the database whose name is the value of :setting:`NAME` in
+ :setting:`DATABASES`, and sets :setting:`NAME` to the value of
+ ``old_database_name``.
- ``verbosity`` has the same behavior as in ``run_tests()``.
+ The ``verbosity`` argument has the same behavior as for
+ :class:`~django.test.simple.DjangoTestSuiteRunner`.