From f6eb4aef576ec944956e5ad3bd42b5f3f4c6d4cc Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 3 Nov 2020 10:41:13 -0500 Subject: [PATCH] Work consistently across Python 2 and 3. --- src/allmydata/test/test_storage_client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/allmydata/test/test_storage_client.py b/src/allmydata/test/test_storage_client.py index c78a56f5e..8345e330d 100644 --- a/src/allmydata/test/test_storage_client.py +++ b/src/allmydata/test/test_storage_client.py @@ -1,11 +1,11 @@ from six import ensure_text +from json import ( + loads, +) + import hashlib from mock import Mock -from json import ( - dumps, - loads, -) from fixtures import ( TempDir, ) @@ -464,7 +464,7 @@ class StoragePluginWebPresence(AsyncTestCase): plugin_name=self.storage_plugin, ).encode("utf-8") result = yield do_http("get", url) - self.assertThat(result, Equals(dumps({b"web": b"1"}))) + self.assertThat(loads(result), Equals({"web": "1"})) @inlineCallbacks def test_plugin_resource_persistent_across_requests(self):