def test_callback(self):
        callback = Callback(self.monitor)
        self.monitor.callback = callback
        chunk_size = int(math.ceil(self.encoder.len / 4.0))
        while self.monitor.read(chunk_size):
            pass
        assert callback.called == 5
dataset/ETHPy150Open sigmavirus24/requests-toolbelt/tests/test_multipart_monitor.py/TestMultipartEncoderMonitor.test_callback/original