mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #20004 -- Moved non DB-related assertions to SimpleTestCase.
Thanks zalew for the suggestion and work on a patch. Also updated, tweaked and fixed testing documentation.
This commit is contained in:
parent
69523c1ba3
commit
0a50311063
9 changed files with 425 additions and 370 deletions
|
@ -201,8 +201,8 @@ According to :pep:`3333`:
|
|||
Specifically, :attr:`HttpResponse.content <django.http.HttpResponse.content>`
|
||||
contains ``bytes``, which may become an issue if you compare it with a
|
||||
``str`` in your tests. The preferred solution is to rely on
|
||||
:meth:`~django.test.TestCase.assertContains` and
|
||||
:meth:`~django.test.TestCase.assertNotContains`. These methods accept a
|
||||
:meth:`~django.test.SimpleTestCase.assertContains` and
|
||||
:meth:`~django.test.SimpleTestCase.assertNotContains`. These methods accept a
|
||||
response and a unicode string as arguments.
|
||||
|
||||
Coding guidelines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue