예제 #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
예제 #2
0
파일: streamer_test.py 프로젝트: tilgovi/h
 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
예제 #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
예제 #4
0
파일: streamer_test.py 프로젝트: tilgovi/h
 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