Exemplo n.º 1
0
 def test_no_send_when_socket_should_not_receive_event(self):
     self.should.return_value = False
     sock = FakeSocket('pidgeon')
     broadcast_from_queue(self.queue, [sock])
     assert sock.send.called is False
Exemplo n.º 2
0
 def test_no_send_when_socket_should_not_receive_event(self):
     self.should.return_value = False
     sock = FakeSocket("pidgeon")
     broadcast_from_queue(self.queue, [sock])
     assert sock.send.called is False
Exemplo n.º 3
0
 def test_send_when_socket_should_receive_event(self):
     self.should.return_value = True
     sock = FakeSocket('giraffe')
     broadcast_from_queue(self.queue, [sock])
     assert sock.send.called
Exemplo n.º 4
0
 def test_send_when_socket_should_receive_event(self):
     self.should.return_value = True
     sock = FakeSocket("giraffe")
     broadcast_from_queue(self.queue, [sock])
     assert sock.send.called