'L{FileBodyProducer.stopProducing} stops the underlying L{IPullProducer}
and the cooperative task responsible for calling C{resumeProducing} and
closes the input file but does not cause the L{Deferred} returned by
C{startProducing} to fire.'

def test_stopProducing(self):

    expectedResult = 'hello,    world'
    readSize = 3
    output = BytesIO()
    consumer = FileConsumer(output)
    inputFile = BytesIO(expectedResult)
    producer = FileBodyProducer(inputFile, self.cooperator, readSize)
    complete = producer.startProducing(consumer)
    producer.stopProducing()
    self.assertTrue(inputFile.closed)
    self._scheduled.pop(0)()
    self.assertEqual('', output.getvalue())
    self.assertNoResult(complete)
