[Zope-Checkins] CVS: Zope3/lib/python/Zope/Server/VFS/tests - testPublisherFilesystem.py:1.1.4.2

Shane Hathaway shane@cvs.zope.org
Wed, 24 Apr 2002 17:18:51 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Server/VFS/tests
In directory cvs.zope.org:/tmp/cvs-serv19664/VFS/tests

Modified Files:
      Tag: Zope-3x-branch
	testPublisherFilesystem.py 
Log Message:
Re-enabled testing for correct exception types thrown by the publisher FS.


=== Zope3/lib/python/Zope/Server/VFS/tests/testPublisherFilesystem.py 1.1.4.1 => 1.1.4.2 ===
     def check_writable(self, name):
         """See IVFSDirectoryPublisher."""
-        if not self.items.has_key(name):
-            return 1
-        return self.items[name].isfile()
+        if self.items.has_key(name):
+            if not self.items[name].isfile():
+                raise IOError, 'Is not a file'
 
 
 class PublisherFileSystemTests(unittest.TestCase, WriteFilesystemTests):
@@ -155,8 +155,7 @@
 
     filesystem_class = PublisherFileSystem
 
-    # XXX for now, the publisher always eats exceptions.
-    check_exceptions = 0
+    check_exceptions = 1
 
     def setUp(self):