Commit c89e5f25 authored by Ivan Tyagov's avatar Ivan Tyagov

'Embedded File' replaces 'File' and 'Image'

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42023 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b460a671
...@@ -1255,7 +1255,7 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -1255,7 +1255,7 @@ class TestERP5Base(ERP5TypeTestCase):
# We can add Images inside Persons and Organisation # We can add Images inside Persons and Organisation
for entity in (self.getPersonModule().newContent(portal_type='Person'), for entity in (self.getPersonModule().newContent(portal_type='Person'),
self.getOrganisationModule().newContent(portal_type='Organisation')): self.getOrganisationModule().newContent(portal_type='Organisation')):
image = entity.newContent(portal_type='Image') image = entity.newContent(portal_type='Embedded File')
self.assertEquals([], image.checkConsistency()) self.assertEquals([], image.checkConsistency())
image.view() # viewing the image does not cause error image.view() # viewing the image does not cause error
......
...@@ -1678,11 +1678,11 @@ class TestInvoice(TestInvoiceMixin): ...@@ -1678,11 +1678,11 @@ class TestInvoice(TestInvoiceMixin):
title='Resource',) title='Resource',)
client = self.portal.organisation_module.newContent( client = self.portal.organisation_module.newContent(
portal_type='Organisation', title='Client') portal_type='Organisation', title='Client')
client_logo = client.newContent(portal_type='Image', client_logo = client.newContent(portal_type='Embedded File',
id='default_image') id='default_image')
vendor = self.portal.organisation_module.newContent( vendor = self.portal.organisation_module.newContent(
portal_type='Organisation', title='Vendor') portal_type='Organisation', title='Vendor')
vendor_logo = vendor.newContent(portal_type='Image', vendor_logo = vendor.newContent(portal_type='Embedded File',
id='default_image') id='default_image')
self.assertEquals(0, vendor_logo.getSize()) self.assertEquals(0, vendor_logo.getSize())
self.assertEquals(0, vendor.getDefaultImageWidth()) self.assertEquals(0, vendor.getDefaultImageWidth())
...@@ -1725,12 +1725,12 @@ class TestInvoice(TestInvoiceMixin): ...@@ -1725,12 +1725,12 @@ class TestInvoice(TestInvoiceMixin):
file_data = FileUpload(__file__, 'rb') file_data = FileUpload(__file__, 'rb')
client = self.portal.organisation_module.newContent( client = self.portal.organisation_module.newContent(
portal_type='Organisation', title='Client') portal_type='Organisation', title='Client')
client_logo = client.newContent(portal_type='Image', client_logo = client.newContent(portal_type='Embedded File',
id='default_image', id='default_image',
file=file_data) file=file_data)
vendor = self.portal.organisation_module.newContent( vendor = self.portal.organisation_module.newContent(
portal_type='Organisation', title='Vendor') portal_type='Organisation', title='Vendor')
vendor_logo = vendor.newContent(portal_type='Image', vendor_logo = vendor.newContent(portal_type='Embedded File',
id='default_image', id='default_image',
file=file_data) file=file_data)
......
...@@ -310,7 +310,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin): ...@@ -310,7 +310,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
parent_dir = os.path.dirname(current_dir) parent_dir = os.path.dirname(current_dir)
image_path = os.path.join(parent_dir, 'www', 'form_printout_icon.png') image_path = os.path.join(parent_dir, 'www', 'form_printout_icon.png')
file_data = FileUpload(image_path, 'rb') file_data = FileUpload(image_path, 'rb')
image = person1.newContent(portal_type='Image') image = person1.newContent(portal_type='Embedded File')
image.edit(file=file_data) image.edit(file=file_data)
foo_printout = image.Foo_viewAsODGPrintout foo_printout = image.Foo_viewAsODGPrintout
......
...@@ -71,7 +71,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -71,7 +71,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
person_module.pers.setCareerRole(None) person_module.pers.setCareerRole(None)
if person_module.pers._getOb('img', None) is 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: if person_module._getOb('pers_without_image', None) is None:
person = person_module.newContent( person = person_module.newContent(
......
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