示例#1
0
    def test_emit(self):
        catcher_handler = rally_logging.CatcherHandler()
        catcher_handler.buffer = mock.Mock()

        catcher_handler.emit("foobar")

        catcher_handler.buffer.append.assert_called_once_with("foobar")
示例#2
0
 def test_shouldFlush(self):
     catcher_handler = rally_logging.CatcherHandler()
     self.assertFalse(catcher_handler.shouldFlush())
示例#3
0
 def test_init(self, mock_buffering_handler___init__):
     catcher_handler = rally_logging.CatcherHandler()
     mock_buffering_handler___init__.assert_called_once_with(
         catcher_handler, 0)