'Writing buffers correctly.'

def test_writeBuffering(self):

    f = self.observedFile()
    f.write('Hello')
    self.assertEqual(f.messages, [])
    f.write(',    world!\n')
    self.assertEqual(f.messages, [u'Hello,    world!'])
    f.write("It's    nice    to    meet    you.\n\nIndeed.")
    self.assertEqual(f.messages, [u'Hello,    world!', u"It's    nice    to    meet    you.", u''])
