[Zope-CVS] CVS: Products/AdaptableStorage/tests - testZope2FS.py:1.23
Shane Hathaway
shane@zope.com
Mon, 3 Mar 2003 17:55:24 -0500
Update of /cvs-repository/Products/AdaptableStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv6510/tests
Modified Files:
testZope2FS.py
Log Message:
When there are no stored properties, revert the property schema to the class
default. (This makes it possible to set the title of a newly-created
filesystem directory.)
=== Products/AdaptableStorage/tests/testZope2FS.py 1.22 => 1.23 ===
--- Products/AdaptableStorage/tests/testZope2FS.py:1.22 Sat Mar 1 15:39:26 2003
+++ Products/AdaptableStorage/tests/testZope2FS.py Mon Mar 3 17:55:23 2003
@@ -507,6 +507,27 @@
conn.close()
+ def testDefaultPropertySchema(self):
+ # Verify Zope uses the default property schema when no properties
+ # are set.
+ dir = self.conn.expandPath('/')
+ os.mkdir(os.path.join(dir, 'test'))
+ conn = self.db.open()
+ try:
+ app = conn.root()['Application']
+ self.assert_(hasattr(app, 'test'))
+ self.assert_(isinstance(app['test'], Folder))
+ self.assertEqual(app['test'].title, '')
+ props = app['test']._properties
+ for p in props:
+ if p['id'] == 'title':
+ break
+ else:
+ self.fail('No title property found')
+ finally:
+ conn.close()
+
+
class Zope2FSUnderscoreTests (Zope2FSTests):