Another passing test on Python 3.
This commit is contained in:
parent
b61b0a9001
commit
add26895cf
|
@ -98,7 +98,7 @@ class ShareFinder(object):
|
||||||
|
|
||||||
# internal methods
|
# internal methods
|
||||||
def loop(self):
|
def loop(self):
|
||||||
pending_s = ",".join([rt.server.get_name()
|
pending_s = ",".join([str(rt.server.get_name(), "utf-8")
|
||||||
for rt in self.pending_requests]) # sort?
|
for rt in self.pending_requests]) # sort?
|
||||||
self.log(format="ShareFinder loop: running=%(running)s"
|
self.log(format="ShareFinder loop: running=%(running)s"
|
||||||
" hungry=%(hungry)s, pending=%(pending)s",
|
" hungry=%(hungry)s, pending=%(pending)s",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
from past.builtins import unicode
|
from past.builtins import unicode, chr as byteschr, long
|
||||||
|
|
||||||
import os, re, sys, time, json
|
import os, re, sys, time, json
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
@ -911,7 +911,7 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
|
||||||
config = "[client]\n"
|
config = "[client]\n"
|
||||||
if helper_furl:
|
if helper_furl:
|
||||||
config += "helper.furl = %s\n" % helper_furl
|
config += "helper.furl = %s\n" % helper_furl
|
||||||
basedir.child("tahoe.cfg").setContent(config)
|
basedir.child("tahoe.cfg").setContent(config.encode("utf-8"))
|
||||||
private = basedir.child("private")
|
private = basedir.child("private")
|
||||||
private.makedirs()
|
private.makedirs()
|
||||||
write_introducer(
|
write_introducer(
|
||||||
|
@ -1316,10 +1316,10 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
|
||||||
#print("STATS")
|
#print("STATS")
|
||||||
#from pprint import pprint
|
#from pprint import pprint
|
||||||
#pprint(stats)
|
#pprint(stats)
|
||||||
s = stats["stats"]
|
s = stats[b"stats"]
|
||||||
self.failUnlessEqual(s["storage_server.accepting_immutable_shares"], 1)
|
self.failUnlessEqual(s[b"storage_server.accepting_immutable_shares"], 1)
|
||||||
c = stats["counters"]
|
c = stats[b"counters"]
|
||||||
self.failUnless("storage_server.allocate" in c)
|
self.failUnless(b"storage_server.allocate" in c)
|
||||||
d.addCallback(_got_stats)
|
d.addCallback(_got_stats)
|
||||||
return d
|
return d
|
||||||
d.addCallback(_grab_stats)
|
d.addCallback(_grab_stats)
|
||||||
|
@ -1605,7 +1605,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def flip_bit(self, good):
|
def flip_bit(self, good):
|
||||||
return good[:-1] + chr(ord(good[-1]) ^ 0x01)
|
return good[:-1] + byteschr(ord(good[-1:]) ^ 0x01)
|
||||||
|
|
||||||
def mangle_uri(self, gooduri):
|
def mangle_uri(self, gooduri):
|
||||||
# change the key, which changes the storage index, which means we'll
|
# change the key, which changes the storage index, which means we'll
|
||||||
|
|
Loading…
Reference in New Issue