~statik/+junk/django-nfa

« back to all changes in this revision

Viewing changes to docs/testing.txt

  • Committer: brosner
  • Date: 2008-06-07 17:10:16 UTC
  • Revision ID: svn-v3-trunk1:bcc190cf-cafb-0310-a4f2-bffc1f526a37:django%2Fbranches%2Fnewforms-admin:7584
newforms-admin: Merged from trunk up to [7583].

Show diffs side-by-side

added added

removed removed

Lines of Context:
822
822
    that ``text`` appears in the content of the response. If ``count`` is
823
823
    provided, ``text`` must occur exactly ``count`` times in the response.
824
824
 
 
825
``assertNotContains(response, text, status_code=200)``
 
826
    Asserts that a ``Response`` instance produced the given ``status_code`` and
 
827
    that ``text`` does not appears in the content of the response.
 
828
 
825
829
``assertFormError(response, form, field, errors)``
826
830
    Asserts that a field on a form raises the provided list of errors when
827
831
    rendered on the form.
837
841
    ``errors`` is an error string, or a list of error strings, that are
838
842
    expected as a result of form validation.
839
843
 
 
844
``assertTemplateUsed(response, template_name)``
 
845
    Asserts that the template with the given name was used in rendering the
 
846
    response.
 
847
 
 
848
    The name is a string such as ``'admin/index.html'``.
 
849
 
840
850
``assertTemplateNotUsed(response, template_name)``
841
851
    Asserts that the template with the given name was *not* used in rendering
842
852
    the response.
846
856
    it redirected to ``expected_url`` (including any GET data), and the subsequent
847
857
    page was received with ``target_status_code``.
848
858
 
849
 
``assertTemplateUsed(response, template_name)``
850
 
    Asserts that the template with the given name was used in rendering the
851
 
    response.
852
 
 
853
 
    The name is a string such as ``'admin/index.html'``.
854
 
 
855
859
E-mail services
856
860
---------------
857
861