diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-19 21:21:23 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-19 21:21:53 +0200 |
| commit | 7631fb8f37f0ba8155208a7a9f79f3a9958ac9b1 (patch) | |
| tree | 128eb685a41c45b46352f2ac1763e38209fdd831 /docs/topics/python3.txt | |
| parent | a2ba02614f693debf977db9f3c7ec81c127e3778 (diff) | |
Clarified a sentence in the Python 3 docs.
Thanks dstufft for the report.
Diffstat (limited to 'docs/topics/python3.txt')
| -rw-r--r-- | docs/topics/python3.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index b22a331514..9b393ffd85 100644 --- a/docs/topics/python3.txt +++ b/docs/topics/python3.txt @@ -191,10 +191,11 @@ According to :pep:`3333`: - input and output streams are always :class:`bytes` objects. Specifically, :attr:`HttpResponse.content <django.http.HttpResponse.content>` -contains :class:`bytes`, which may require refactoring your tests.This won't -be an issue if you use :meth:`~django.test.TestCase.assertContains` and -:meth:`~django.test.TestCase.assertNotContains`: these methods expect a -unicode string. +contains :class:`bytes`, which may become an issue if you compare it with a +:class:`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 +response and a unicode string as arguments. Coding guidelines ================= |
