'Check that \'put\' uploads files correctly when overwriting a longer
file.'

def test_putOverLongerFile(self):

    with self.testDir.child('shorterFile').open(mode='w') as f:
        f.write('a')
    with self.testDir.child('longerFile').open(mode='w') as f:
        f.write('bb')
    def _checkPut(result):
        self.assertFilesEqual(self.testDir.child('shorterFile'), self.testDir.child('longerFile'))
    d = self.runCommand(('put    %s/shorterFile    longerFile' % (self.testDir.path,)))
    d.addCallback(_checkPut)
    return d
