From d382571ca4cfc119f39e9ed79765d945ba17e5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Mon, 24 May 2010 12:49:04 +0000 Subject: [PATCH] - 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 --- product/ERP5/tests/testERP5Base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/product/ERP5/tests/testERP5Base.py b/product/ERP5/tests/testERP5Base.py index ee8f929324..7198287477 100644 --- a/product/ERP5/tests/testERP5Base.py +++ b/product/ERP5/tests/testERP5Base.py @@ -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() -- 2.30.9