Browse Source

Merge #242: Fix bugs in bigstring and test_commands

46e61f3 Fix bugs in bigstring and test_commands (AdamISZ)
master
AdamISZ 7 years ago
parent
commit
3027c03528
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 2
      jmbase/jmbase/bigstring.py
  2. 6
      jmbase/test/test_commands.py

2
jmbase/jmbase/bigstring.py

@ -43,7 +43,7 @@ class BigString(amp.Argument):
nextChunk = value.read(CHUNK_MAX)
if not nextChunk:
break
strings["%s.%d" % (name, counter)] = nextChunk
strings["{}.{}".format(name, counter).encode('ascii')] = nextChunk
counter += 1
def fromvalue(self, value):

6
jmbase/test/test_commands.py

@ -66,8 +66,8 @@ class JMTestServerProtocol(JMBaseProtocol):
return {'accepted': True}
@JMSetup.responder
def on_JM_SETUP(self, role, n_counterparties):
show_receipt("JMSETUP", role,n_counterparties)
def on_JM_SETUP(self, role, initdata):
show_receipt("JMSETUP", role, initdata)
d = self.callRemote(JMSetupDone)
self.defaultCallbacks(d)
return {'accepted': True}
@ -157,7 +157,7 @@ class JMTestClientProtocol(JMBaseProtocol):
show_receipt("JMUP")
d = self.callRemote(JMSetup,
role="TAKER",
n_counterparties=4) #TODO this number should be set
initdata="none")
self.defaultCallbacks(d)
return {'accepted': True}

Loading…
Cancel
Save