'When L{basic.FileSender.beginFileTransfer} is called, it registers
itself with provided consumer, as a non-streaming producer.'

def test_producerRegistered(self):

    source = BytesIO('Test    content')
    consumer = proto_helpers.StringTransport()
    sender = basic.FileSender()
    sender.beginFileTransfer(source, consumer)
    self.assertEqual(consumer.producer, sender)
    self.assertFalse(consumer.streaming)
