Beispiel #1
0
 def when_both_sides_close_channel(self):
     # Client tries to close connection
     self.task = asyncio.async(self.channel.close(), loop=self.loop)
     self.tick()
     # Before OK arrives server closes connection
     self.server.send_method(
         self.channel.id,
         spec.ChannelClose(404, 'i am tired of you', 40, 50))
     self.tick()
     self.task.result()
Beispiel #2
0
 def when_error_arrives(self):
     self.server.send_method(
         self.channel.id, spec.ChannelClose(404, 'Bad queue', 40, 50))
Beispiel #3
0
 def given_the_server_closed_the_channel(self):
     self.server.send_method(self.channel.id, spec.ChannelClose(123, 'i am tired of you', 40, 50))
     self.server.reset()
Beispiel #4
0
 def when_the_server_shuts_the_channel_down(self):
     self.server.send_method(self.channel.id, spec.ChannelClose(123, 'i am tired of you', 40, 50))
Beispiel #5
0
 def it_should_send_ChannelClose(self):
     self.server.should_have_received_method(1, spec.ChannelClose(0, 'Channel closed by application', 0, 0))
Beispiel #6
0
 def when_ChannelClose_arrives(self):
     self.server.send_method(self.channel.id, spec.ChannelClose(123, 'i am tired of you', 40, 50))
Beispiel #7
0
 def when_ChannelClose_arrives(self):
     self.server.send_method(self.channel.id, spec.ChannelClose(406, "the precondition, she failed", 50, 10))
     self.tick()