Changeset 5169
- Timestamp:
- 05/07/07 22:45:33 (2 years ago)
- Files:
-
- django/trunk/docs/testing.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/testing.txt
r5168 r5169 469 469 470 470 ``assertFormError(response, form, field, errors)`` 471 Assert that a field on a form raised the provided list of errors when 472 rendered on the form. 473 474 ``form`` is the name the form object was given in the template context. 475 476 ``field`` is the name of the field on the form to check. If ``field`` 471 Assert that a field on a form raised the provided list of errors when 472 rendered on the form. 473 474 ``form`` is the name the form object was given in the template context. 475 476 ``field`` is the name of the field on the form to check. If ``field`` 477 477 has a value of ``None``, non-field errors will be checked. 478 479 ``errors`` is an error string, or a list of error strings, that are 480 expected as a result of form validation. 481 478 479 ``errors`` is an error string, or a list of error strings, that are 480 expected as a result of form validation. 481 482 482 ``assertTemplateNotUsed(response, template_name)`` 483 Assert that the template with the given name was *not* used in rendering 483 Assert that the template with the given name was *not* used in rendering 484 484 the response. 485 485 486 486 ``assertRedirects(response, expected_path)`` 487 487 Assert that the response received redirects the browser to the provided 488 path, and that the expected_path can be retrieved. 488 path, and that the expected_path can be retrieved. 489 489 490 490 ``assertTemplateUsed(response, template_name)`` 491 491 Assert that the template with the given name was used in rendering the 492 492 response. 493 494 493 494 495 495 Running tests 496 496 =============
