Hallöchen!
When writing unit tests, the response's content is a byte string.
If I need a unicode string, I can write
response.decode(reponse.charset)
However, the "charset" attribute is not documented in
<https://docs.djangoproject.com/en/dev/topics/testing/tools/#testing-responses>.
Is this an oversight? (In
<https://docs.djangoproject.com/en/1.8/ref/template-response/#id1>,
it is mentioned.)
Is there a better way to get a unicode response?
Tschö,
Torsten.
--
Torsten Bronger Jabber ID: torsten.bronger@jabber.rwth-aachen.de
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/87oaixkjpd.fsf%40physik.rwth-aachen.de.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment