Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
Unicode content in test response
17 views
Skip to first unread message
Torsten Bronger
unread,
Jul 27, 2015, 5:58:04 AM
7/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
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...@jabber.rwth-aachen.de
Reply all
Reply to author
Forward
0 new messages