Python 3 updates.

This commit is contained in:
Itamar Turner-Trauring 2021-05-03 11:48:02 -04:00
parent d3be3ce1e6
commit ae739dfd9e
1 changed files with 5 additions and 5 deletions

View File

@ -363,11 +363,11 @@ class CLI(CLITestMixin, unittest.TestCase):
"didn't see 'mqfblse6m5a6dh45isu2cg7oji' in '%s'" % err) "didn't see 'mqfblse6m5a6dh45isu2cg7oji' in '%s'" % err)
def test_alias(self): def test_alias(self):
def s128(c): return base32.b2a(c*(128/8)) def s128(c): return base32.b2a(c*(128//8))
def s256(c): return base32.b2a(c*(256/8)) def s256(c): return base32.b2a(c*(256//8))
TA = "URI:DIR2:%s:%s" % (s128("T"), s256("T")) TA = b"URI:DIR2:%s:%s" % (s128(b"T"), s256(b"T"))
WA = "URI:DIR2:%s:%s" % (s128("W"), s256("W")) WA = b"URI:DIR2:%s:%s" % (s128(b"W"), s256(b"W"))
CA = "URI:DIR2:%s:%s" % (s128("C"), s256("C")) CA = b"URI:DIR2:%s:%s" % (s128(b"C"), s256(b"C"))
aliases = {"tahoe": TA, aliases = {"tahoe": TA,
"work": WA, "work": WA,
"c": CA} "c": CA}