Exemple #1
0
 def do_accept(self, packet, seq):
     packet.seq = seq
     self.door.update(packet.toMessage(self.key))
     return self.input_queue.get(block = False)
Exemple #2
0
 def do_not_accept(self, packet, seq):
     packet.seq = seq
     self.door.update(packet.toMessage(self.key))
Exemple #3
0
 def do_not_accept_test(self, packet, seq):
     packet.seq = seq
     self.assertFalse(self.door.update(packet.toMessage(self.key)))
     self.assertTrue(self.input_queue.empty(), "Message with seq nr %d was accepted" % seq)
Exemple #4
0
 def do_accept_test(self, packet, seq):
     packet.seq = seq
     self.assertTrue(self.door.update(packet.toMessage(self.key)))
     self.assertTrue(not self.input_queue.empty(), "Message with seq nr %d was not accepted" % seq)
     return self.input_queue.get(block = False)
 def do_accept(self, packet, seq):
     packet.seq = seq
     self.door.update(packet.toMessage(self.key))
     return self.input_queue.get(block=False)
 def do_not_accept_test(self, packet, seq):
     packet.seq = seq
     self.assertFalse(self.door.update(packet.toMessage(self.key)))
     self.assertTrue(self.input_queue.empty(),
                     "Message with seq nr %d was accepted" % seq)
 def do_not_accept(self, packet, seq):
     packet.seq = seq
     self.door.update(packet.toMessage(self.key))
 def do_accept_test(self, packet, seq):
     packet.seq = seq
     self.assertTrue(self.door.update(packet.toMessage(self.key)))
     self.assertTrue(not self.input_queue.empty(),
                     "Message with seq nr %d was not accepted" % seq)
     return self.input_queue.get(block=False)