From c89e5f25c497005239945409c9d291056d37e821 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Wed, 5 Jan 2011 11:25:42 +0000 Subject: [PATCH] 'Embedded File' replaces 'File' and 'Image' git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42023 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testERP5Base.py | 2 +- product/ERP5/tests/testInvoice.py | 8 ++++---- product/ERP5OOo/tests/testFormPrintoutAsODG.py | 2 +- product/ERP5OOo/tests/testOOoStyle.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/product/ERP5/tests/testERP5Base.py b/product/ERP5/tests/testERP5Base.py index 9a86a90fc7..c0d6c7db8c 100644 --- a/product/ERP5/tests/testERP5Base.py +++ b/product/ERP5/tests/testERP5Base.py @@ -1255,7 +1255,7 @@ class TestERP5Base(ERP5TypeTestCase): # We can add Images inside Persons and Organisation for entity in (self.getPersonModule().newContent(portal_type='Person'), self.getOrganisationModule().newContent(portal_type='Organisation')): - image = entity.newContent(portal_type='Image') + image = entity.newContent(portal_type='Embedded File') self.assertEquals([], image.checkConsistency()) image.view() # viewing the image does not cause error diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py index e43e05e2e6..eab6cc1e5e 100644 --- a/product/ERP5/tests/testInvoice.py +++ b/product/ERP5/tests/testInvoice.py @@ -1678,11 +1678,11 @@ class TestInvoice(TestInvoiceMixin): title='Resource',) client = self.portal.organisation_module.newContent( portal_type='Organisation', title='Client') - client_logo = client.newContent(portal_type='Image', + client_logo = client.newContent(portal_type='Embedded File', id='default_image') vendor = self.portal.organisation_module.newContent( portal_type='Organisation', title='Vendor') - vendor_logo = vendor.newContent(portal_type='Image', + vendor_logo = vendor.newContent(portal_type='Embedded File', id='default_image') self.assertEquals(0, vendor_logo.getSize()) self.assertEquals(0, vendor.getDefaultImageWidth()) @@ -1725,12 +1725,12 @@ class TestInvoice(TestInvoiceMixin): file_data = FileUpload(__file__, 'rb') client = self.portal.organisation_module.newContent( portal_type='Organisation', title='Client') - client_logo = client.newContent(portal_type='Image', + client_logo = client.newContent(portal_type='Embedded File', id='default_image', file=file_data) vendor = self.portal.organisation_module.newContent( portal_type='Organisation', title='Vendor') - vendor_logo = vendor.newContent(portal_type='Image', + vendor_logo = vendor.newContent(portal_type='Embedded File', id='default_image', file=file_data) diff --git a/product/ERP5OOo/tests/testFormPrintoutAsODG.py b/product/ERP5OOo/tests/testFormPrintoutAsODG.py index 076a60b331..d42a39dc18 100644 --- a/product/ERP5OOo/tests/testFormPrintoutAsODG.py +++ b/product/ERP5OOo/tests/testFormPrintoutAsODG.py @@ -310,7 +310,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin): parent_dir = os.path.dirname(current_dir) image_path = os.path.join(parent_dir, 'www', 'form_printout_icon.png') file_data = FileUpload(image_path, 'rb') - image = person1.newContent(portal_type='Image') + image = person1.newContent(portal_type='Embedded File') image.edit(file=file_data) foo_printout = image.Foo_viewAsODGPrintout diff --git a/product/ERP5OOo/tests/testOOoStyle.py b/product/ERP5OOo/tests/testOOoStyle.py index ef2e0a2c8d..b2604ba8bf 100644 --- a/product/ERP5OOo/tests/testOOoStyle.py +++ b/product/ERP5OOo/tests/testOOoStyle.py @@ -71,7 +71,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional): person_module.pers.setCareerRole(None) if person_module.pers._getOb('img', None) is None: - person_module.pers.newContent(portal_type='Image', id='img') + person_module.pers.newContent(portal_type='Embedded File', id='img') if person_module._getOb('pers_without_image', None) is None: person = person_module.newContent( -- 2.30.9