diff --git a/src/allmydata/test/test_storage_client.py b/src/allmydata/test/test_storage_client.py index f6bae28a7..1f5c1306d 100644 --- a/src/allmydata/test/test_storage_client.py +++ b/src/allmydata/test/test_storage_client.py @@ -295,7 +295,7 @@ class PluginMatchedAnnouncement(SyncTestCase): # notice how the announcement is for a different storage plugin # than the one that is enabled. u"name": u"tahoe-lafs-dummy-v2", - u"storage-server-FURL": SOME_FURL.decode("ascii"), + u"storage-server-FURL": SOME_FURL, }], } self.publish(server_id, ann, self.introducer_client) @@ -323,7 +323,7 @@ class PluginMatchedAnnouncement(SyncTestCase): u"storage-options": [{ # and this announcement is for a plugin with a matching name u"name": plugin_name, - u"storage-server-FURL": SOME_FURL.decode("ascii"), + u"storage-server-FURL": SOME_FURL, }], } self.publish(server_id, ann, self.introducer_client) @@ -374,7 +374,7 @@ class PluginMatchedAnnouncement(SyncTestCase): u"storage-options": [{ # and this announcement is for a plugin with a matching name u"name": plugin_name, - u"storage-server-FURL": SOME_FURL.decode("ascii"), + u"storage-server-FURL": SOME_FURL, }], } self.publish(server_id, ann, self.introducer_client) @@ -525,7 +525,7 @@ storage: ann: anonymous-storage-FURL: {furl} permutation-seed-base32: aaaaaaaaaaaaaaaaaaaaaaaa -""".format(furl=SOME_FURL.decode("utf-8")) +""".format(furl=SOME_FURL) servers = yamlutil.safe_load(servers_yaml) permseed = base32.a2b(b"aaaaaaaaaaaaaaaaaaaaaaaa") broker.set_static_servers(servers["storage"]) @@ -541,7 +541,7 @@ storage: ann2 = { "service-name": "storage", - "anonymous-storage-FURL": "pb://{}@nowhere/fake2".format(base32.b2a(b"1")), + "anonymous-storage-FURL": "pb://{}@nowhere/fake2".format(str(base32.b2a(b"1"), "utf-8")), "permutation-seed-base32": "bbbbbbbbbbbbbbbbbbbbbbbb", } broker._got_announcement(key_s, ann2) @@ -605,7 +605,7 @@ storage: } def add_one_server(x): - data["anonymous-storage-FURL"] = "pb://%s@nowhere/fake" % (base32.b2a(b"%d" % x),) + data["anonymous-storage-FURL"] = "pb://%s@nowhere/fake" % (str(base32.b2a(b"%d" % x), "ascii"),) tub = Mock() new_tubs.append(tub) got_announcement(b'v0-1234-%d' % x, data)