'Permission errors are not swallowed'

def test_readonly_root(self):

    os.chmod(MEDIA_ROOT, 320)
    self.addCleanup(os.chmod, MEDIA_ROOT, 448)
    try:
        self.obj.testfile.save(u'foo.txt', SimpleUploadedFile(u'foo.txt', 'x'))
    except OSError as err:
        self.assertEqual(err.errno, errno.EACCES)
    except Exception:
        self.fail((u'OSError    [Errno    %s]    not    raised.' % errno.EACCES))
