Fixed #11253 -- Normalized the way the docs refer to TestCase.assert* methods. Thanks to SmileyChris for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-06-18 13:36:11 +00:00
parent b9d1757840
commit 3894ba853d
1 changed files with 6 additions and 6 deletions

View File

@ -139,7 +139,7 @@ In the case of model tests, note that the test runner takes care of creating
its own test database. That is, any test that accesses a database -- by
creating and saving model instances, for example -- will not affect your
production database. However, the database is not refreshed between doctests,
so if your doctest requires a certain state you should consider flushin the
so if your doctest requires a certain state you should consider flushing the
database or loading a fixture. (See the section on fixtures, below, for more
on this.) Note that to use this feature, the database user Django is connecting
as must have ``CREATE DATABASE`` rights.
@ -1042,7 +1042,7 @@ applications:
Asserts that a ``Response`` instance produced the given ``status_code`` and
that ``text`` does not appears in the content of the response.
.. method:: assertFormError(response, form, field, errors)
.. method:: TestCase.assertFormError(response, form, field, errors)
Asserts that a field on a form raises the provided list of errors when
rendered on the form.
@ -1057,19 +1057,19 @@ applications:
``errors`` is an error string, or a list of error strings, that are
expected as a result of form validation.
.. method:: assertTemplateUsed(response, template_name)
.. method:: TestCase.assertTemplateUsed(response, template_name)
Asserts that the template with the given name was used in rendering the
response.
The name is a string such as ``'admin/index.html'``.
.. method:: assertTemplateNotUsed(response, template_name)
.. method:: TestCase.assertTemplateNotUsed(response, template_name)
Asserts that the template with the given name was *not* used in rendering
the response.
.. method:: assertRedirects(response, expected_url, status_code=302, target_status_code=200)
.. method:: TestCase.assertRedirects(response, expected_url, status_code=302, target_status_code=200)
Asserts that the response return a ``status_code`` redirect status, it
redirected to ``expected_url`` (including any GET data), and the final