[Zope-CVS] CVS: Products/AdaptableStorage/tests - testZope2FS.py:1.25
Shane Hathaway
shane@zope.com
Wed, 5 Mar 2003 11:46:34 -0500
Update of /cvs-repository/Products/AdaptableStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv25509
Modified Files:
testZope2FS.py
Log Message:
Added a test that verifies you can now use dotted names when they don't
look like metadata files.
=== Products/AdaptableStorage/tests/testZope2FS.py 1.24 => 1.25 ===
--- Products/AdaptableStorage/tests/testZope2FS.py:1.24 Tue Mar 4 23:25:06 2003
+++ Products/AdaptableStorage/tests/testZope2FS.py Wed Mar 5 11:46:32 2003
@@ -31,6 +31,7 @@
from Products.AdaptableStorage.zodb.StaticResource import StaticResource
from Products.AdaptableStorage.Zope2FS import createMapper
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
+from Products.AdaptableStorage.gateway_fs.public import FSWriteError
from Zope2TestBase import Zope2TestBase, Folder
@@ -556,6 +557,23 @@
data = f.read()
f.close()
self.assert_(data.find(content) >= 0)
+ finally:
+ conn.close()
+
+
+ def testDottedNames(self):
+ # FSConnection should allow dotted names that don't look like
+ # property or remainder files.
+ conn = self.db.open()
+ try:
+ app = conn.root()['Application']
+ f = Folder()
+ f.id = '.Holidays'
+ app._setObject(f.id, f, set_owner=0)
+ f2 = Folder()
+ f2.id = '.Holidays.properties.dat'
+ app._setObject(f2.id, f2, set_owner=0)
+ get_transaction().commit()
finally:
conn.close()