Commit d382571c authored by Łukasz Nowak's avatar Łukasz Nowak

- check that it is possible to use content_type property on portal type not configured to use it


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35563 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6cb29bcb
......@@ -1527,6 +1527,16 @@ class TestERP5Base(ERP5TypeTestCase):
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment