[CMF-checkins] CVS: Products/CMFCore/tests - test_FSMetadata.py:1.8

Jens Vagelpohl jens at dataflake.org
Sat Dec 4 17:05:49 EST 2004


Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv30097/CMFCore/tests

Modified Files:
	test_FSMetadata.py 
Log Message:
- FSObject: Now FSObject-derived items like FSImage or FSFile can have
  security declarations inside the metadata file.
  (http://www.zope.org/Collectors/CMF/289)


=== Products/CMFCore/tests/test_FSMetadata.py 1.7 => 1.8 ===
--- Products/CMFCore/tests/test_FSMetadata.py:1.7	Wed Nov 24 10:12:30 2004
+++ Products/CMFCore/tests/test_FSMetadata.py	Sat Dec  4 17:05:18 2004
@@ -42,6 +42,36 @@
             self.ob.fake_skin.test6,
             ['Manager', 'Anonymous'])
 
+    def test_basicPermissionsOnImage(self):
+        # Test basic FS permissions on Image
+        test_image = getattr(self.ob.fake_skin, 'test_image.gif')
+        assert(test_image.title == 'Test image')
+        self._checkSettings(
+            test_image,
+            'Access contents information',
+            1,
+            ['Manager','Anonymous'])
+        self._checkSettings(
+            test_image,
+            'View management screens',
+            0,
+            ['Manager'])
+
+    def test_basicPermissionsOnFile(self):
+        # Test basic FS permissions on File
+        test_file = getattr(self.ob.fake_skin, 'test_file.swf')
+        assert(test_file.title == 'Test file')
+        self._checkSettings(
+            test_file,
+            'Access contents information',
+            1,
+            ['Manager','Anonymous'])
+        self._checkSettings(
+            test_file,
+            'View management screens',
+            0,
+            ['Manager'])
+
     def test_proxy(self):
         # Test roles
         ob = self.ob.fake_skin.test_dtml



More information about the CMF-checkins mailing list