From 91e16bdcb7b0874baffd0c4a4933c8703c5a194e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 18 Jun 2009 14:17:45 +0000 Subject: [PATCH] [1.0.X] Fixed #11253 -- Normalized the way the docs refer to TestCase.assert* methods. Thanks to SmileyChris for the report and patch. Merge of r11051 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@11063 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/topics/testing.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 8804721715..d7820cbe46 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -139,8 +139,8 @@ 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 -database or loading a fixture. (See the section on fixtures, below, for more +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. @@ -900,7 +900,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. @@ -915,19 +915,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 subsequent