[Erp5-report] r35563 luke - /erp5/trunk/products/ERP5/tests/testERP5Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 24 14:49:06 CEST 2010
Author: luke
Date: Mon May 24 14:49:04 2010
New Revision: 35563
URL: http://svn.erp5.org?rev=35563&view=rev
Log:
- check that it is possible to use content_type property on portal type not configured to use it
Modified:
erp5/trunk/products/ERP5/tests/testERP5Base.py
Modified: erp5/trunk/products/ERP5/tests/testERP5Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Base.py?rev=35563&r1=35562&r2=35563&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] Mon May 24 14:49:04 2010
@@ -1527,6 +1527,16 @@
self.assertEquals('group/nexedi',
self.portal.portal_preferences.getPreferredSectionCategory())
+ def test_content_type_property(self):
+ portal_type = 'Person'
+ person_module = self.portal.getDefaultModule(portal_type)
+ person = person_module.newContent(portal_type=portal_type)
+
+ # assert that test has a sense
+ self.assertEqual(getattr(person, 'getContentType', None), None)
+
+ # edit content_type on document which has no content_type property configured
+ person.edit(content_type='text/xml')
def test_suite():
suite = unittest.TestSuite()
More information about the Erp5-report
mailing list