[extensions-web] tests: use response-provided charset instead of 'utf-8'
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] tests: use response-provided charset instead of 'utf-8'
- Date: Fri, 11 Jan 2019 17:43:48 +0000 (UTC)
commit e0816ec81d56019fec3a51daa3c695d89f9075da
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Fri Jan 11 19:28:10 2019 +0400
tests: use response-provided charset instead of 'utf-8'
sweettooth/extensions/tests.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index 5f98bf6..d086790 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -470,7 +470,7 @@ class UpdateVersionTest(TestCase):
response = self.client.get(reverse('extensions-shell-update'),
dict(installed=json.dumps(installed), shell_version='3.2.0'))
- return json.loads(response.content.decode('utf-8'))
+ return json.loads(response.content.decode(response.charset))
def test_upgrade_me(self):
uuid = self.upgrade_uuid
@@ -537,7 +537,7 @@ class UpdateVersionTest(TestCase):
class QueryExtensionsTest(BasicUserTestCase, TestCase):
def get_response(self, params):
response = self.client.get(reverse('extensions-query'), params)
- return json.loads(response.content.decode('utf-8'))
+ return json.loads(response.content.decode(response.charset))
def gather_uuids(self, params):
if 'sort' not in params:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]