Work consistently across Python 2 and 3.

This commit is contained in:
Itamar Turner-Trauring 2020-11-03 10:41:13 -05:00
parent 3edc1cb29e
commit f6eb4aef57

View File

@ -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):