summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-05-28 11:15:36 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-05-28 11:15:36 +0000
commit526a4410d790f9b3923f7bac6fc4c1eff3b8fbf6 (patch)
treeba182795cd55f34d37fafc3c806e80c40849f215 /docs
parenteedf16d12b675c50d0b0bab60ba8ad2e30a9921e (diff)
Fixed #13634 -- Migrated aggregation tests to use unittest. This removes a flush, which speeds up the tests overall.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index bd727ee136..9b23d546df 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -1248,6 +1248,19 @@ cause of an failure in your test suite.
``target_status_code`` will be the url and status code for the final
point of the redirect chain.
+.. method:: TestCase.assertQuerysetEqual(response, qs, values, transform=repr)
+
+ Asserts that a queryset ``qs`` returns a particular list of values ``values``.
+
+ The comparison of the contents of ``qs`` and ``values`` is performed using
+ the function ``transform``; by default, this means that the ``repr()`` of
+ each value is compared. Any other callable can be used if ``repr()`` doesn't
+ provide a unique or helpful comparison.
+
+ The comparison is also ordering dependent. If ``qs`` doesn't provide an
+ implicit ordering, you will need to apply a ``order_by()`` clause to your
+ queryset to ensure that the test will pass reliably.
+
.. _topics-testing-email:
E-mail services