server/test/unittest_storage.py
changeset 8180 1f6ba9afb925
parent 7979 8bd5031e2201
child 8190 2a3c1b787688
--- a/server/test/unittest_storage.py	Mon Jan 23 12:39:21 2012 +0100
+++ b/server/test/unittest_storage.py	Wed Jan 18 15:27:08 2012 +0100
@@ -22,6 +22,7 @@
 from logilab.common.testlib import unittest_main, tag, Tags
 from cubicweb.devtools.testlib import CubicWebTC
 
+import os
 import os.path as osp
 import shutil
 import tempfile
@@ -90,6 +91,8 @@
         expected_filepath = osp.join(self.tempdir, '%s_data_%s' %
                                      (f1.eid, f1.data_name))
         self.assertTrue(osp.isfile(expected_filepath))
+        # file should be read only
+        self.assertFalse(os.access(expected_filepath, os.W_OK))
         self.assertEqual(file(expected_filepath).read(), 'the-data')
         self.rollback()
         self.assertFalse(osp.isfile(expected_filepath))