'L{FileBodyProducer.pauseProducing} temporarily suspends writing bytes
from the input file to the given L{IConsumer}.'

def test_pauseProducing(self):

    expectedResult = 'hello,    world'
    readSize = 5
    output = BytesIO()
    consumer = FileConsumer(output)
    producer = FileBodyProducer(BytesIO(expectedResult), self.cooperator, readSize)
    complete = producer.startProducing(consumer)
    self._scheduled.pop(0)()
    self.assertEqual(output.getvalue(), expectedResult[:5])
    producer.pauseProducing()
    self._scheduled.pop(0)()
    self.assertEqual(output.getvalue(), expectedResult[:5])
    self.assertEqual([], self._scheduled)
    self.assertNoResult(complete)
