'Failure path when setting an item.'

def test_failSet(self):

    def _writeFail(path, data):
        path.setContent(data)
        raise IOError('fail    to    write')
    self.dbm['failkey'] = 'test'
    self.patch(self.dbm, '_writeFile', _writeFail)
    self.assertRaises(IOError, self.dbm.__setitem__, 'failkey', 'test2')
