Ejemplo n.º 1
0
 def test_with_defaults(self, totalsize, step, expected_times):
     logger = flexmock()
     logger.should_receive('debug').times(expected_times)
     upload_logger = KojiUploadLogger(logger)
     upload_logger.callback(0, totalsize, 0, 0, 0)
     for offset in range(step, totalsize + step, step):
         upload_logger.callback(offset, totalsize, step, 1.0, 1.0)
Ejemplo n.º 2
0
 def test_with_defaults(self, totalsize, step, expected_times):
     logger = flexmock()
     logger.should_receive('debug').times(expected_times)
     upload_logger = KojiUploadLogger(logger)
     upload_logger.callback(0, totalsize, 0, 0, 0)
     for offset in range(step, totalsize + step, step):
         upload_logger.callback(offset, totalsize, step, 1.0, 1.0)
Ejemplo n.º 3
0
 def test_with_notable(self, totalsize, step, notable, expected_times):
     logger = flexmock()
     logger.should_receive('debug').times(expected_times)
     upload_logger = KojiUploadLogger(logger, notable_percent=notable)
     for offset in range(0, totalsize + step, step):
         upload_logger.callback(offset, totalsize, step, 1.0, 1.0)
Ejemplo n.º 4
0
 def test_with_zero(self, totalsize):
     logger = flexmock()
     logger.should_receive('debug').once()
     upload_logger = KojiUploadLogger(logger)
     upload_logger.callback(0, totalsize, 0, 0, 0)
Ejemplo n.º 5
0
 def test_with_notable(self, totalsize, step, notable, expected_times):
     logger = flexmock()
     logger.should_receive('debug').times(expected_times)
     upload_logger = KojiUploadLogger(logger, notable_percent=notable)
     for offset in range(0, totalsize + step, step):
         upload_logger.callback(offset, totalsize, step, 1.0, 1.0)
Ejemplo n.º 6
0
 def test_with_zero(self, totalsize):
     logger = flexmock()
     logger.should_receive('debug').once()
     upload_logger = KojiUploadLogger(logger)
     upload_logger.callback(0, totalsize, 0, 0, 0)