diff options
| author | Unai Zalakain <unai@gisa-elkartea.org> | 2013-11-16 18:54:12 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-08-19 17:34:38 -0400 |
| commit | 5f2542f12a90cfcfb7be776424ef2f7b200df006 (patch) | |
| tree | 74e78ce1ed7c67e1eb009fcdf8de8e9596361537 /django/test | |
| parent | 9d6551204eff9d1ab70b67578f99630716df7490 (diff) | |
Fixed #10190 -- Made HttpResponse charset customizable.
Thanks to Simon Charette, Aymeric Augustin, and Tim Graham
for reviews and contributions.
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/testcases.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index d46f672391..e982706784 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -327,8 +327,8 @@ class SimpleTestCase(unittest.TestCase): else: content = response.content if not isinstance(text, bytes) or html: - text = force_text(text, encoding=response._charset) - content = content.decode(response._charset) + text = force_text(text, encoding=response.charset) + content = content.decode(response.charset) text_repr = "'%s'" % text else: text_repr = repr(text) |
