This commit is contained in:
Brian Warner 2016-05-20 12:12:07 -07:00
parent 390cd08b53
commit 3b86571de3
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ def get_sides(row):
def make_sides(sides):
return list(sides) + [None] * (2 - len(sides))
def generate_mailbox_id():
return base64.b32encode(os.urandom(8)).lower().strip("=")
return base64.b32encode(os.urandom(8)).lower().strip(b"=").decode("ascii")
SideResult = namedtuple("SideResult", ["changed", "empty", "side1", "side2"])

View File

@ -483,7 +483,7 @@ class WebSocketAPI(ServerBase, unittest.TestCase):
c1.send(u"bind", appid=u"appid", side=u"side")
yield c1.sync()
self.assertEqual(self._rendezvous._apps.keys(), [u"appid"])
self.assertEqual(list(self._rendezvous._apps.keys()), [u"appid"])
c1.send(u"bind", appid=u"appid", side=u"side") # duplicate
err = yield c1.next_non_ack()