summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Beaven <smileychris@gmail.com>2011-05-11 21:30:05 +0000
committerChris Beaven <smileychris@gmail.com>2011-05-11 21:30:05 +0000
commit9a4e5112b2384f1ec1db837b41d1ce9792143754 (patch)
tree2e2b4e49b8ea199113f67496f326e4ee6b9b87d2
parent5c08cda6113cf65ca489385bdbece43cd8b1913c (diff)
[1.3.X] Fixes #15595 -- emphasize the benefits of django.test.TestCase. Thanks for the patch Shawn Milochik
Backport of r16214 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/topics/testing.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index e01c3e6155..317a33f695 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -36,7 +36,8 @@ two test frameworks that ship in the Python standard library. The two
frameworks are:
* **Unit tests** -- tests that are expressed as methods on a Python class
- that subclasses ``unittest.TestCase``. For example::
+ that subclasses ``unittest.TestCase`` or Django's customized
+ :class:`TestCase`. For example::
import unittest
@@ -1102,7 +1103,16 @@ Converting a normal ``unittest.TestCase`` to a Django ``TestCase`` is easy:
just change the base class of your test from ``unittest.TestCase`` to
``django.test.TestCase``. All of the standard Python unit test functionality
will continue to be available, but it will be augmented with some useful
-additions.
+additions, including:
+
+ * Automatic loading of fixtures.
+
+ * Wraps each test in a transaction.
+
+ * Creates a TestClient instance.
+
+ * Django-specific assertions for testing for things
+ like redirection and form errors.
.. class:: TransactionTestCase()