Commit 2fe812be authored by Pere Cortes's avatar Pere Cortes Committed by Sebastien Robin

testSafeImage image's path adapt to automatic test

parent 443cda3c
...@@ -54,7 +54,7 @@ class TestSafeImage(ERP5TypeTestCase): ...@@ -54,7 +54,7 @@ class TestSafeImage(ERP5TypeTestCase):
def _createImage(self): def _createImage(self):
portal = self.getPortalObject() portal = self.getPortalObject()
image = portal.restrictedTraverse('portal_skins/erp5_safeimage/img/image_unit_test.jpg') image = portal.restrictedTraverse('portal_skins/erp5_safeimage/img/image_unit_test.jpg')
path_image = "tmp/image_unit_test.jpg" path_image = "image_unit_test.jpg"
fd = os.open(path_image, os.O_CREAT | os.O_RDWR) fd = os.open(path_image, os.O_CREAT | os.O_RDWR)
os.write(fd,str(image.data)) os.write(fd,str(image.data))
os.close(fd) os.close(fd)
...@@ -66,7 +66,7 @@ class TestSafeImage(ERP5TypeTestCase): ...@@ -66,7 +66,7 @@ class TestSafeImage(ERP5TypeTestCase):
def _createTileImage(self): def _createTileImage(self):
portal = self.getPortalObject() portal = self.getPortalObject()
image = portal.restrictedTraverse('portal_skins/erp5_safeimage/img/image_unit_test.jpg') image = portal.restrictedTraverse('portal_skins/erp5_safeimage/img/image_unit_test.jpg')
path_image = "tmp/image_unit_test.jpg" path_image = "image_unit_test.jpg"
fd = os.open(path_image, os.O_CREAT | os.O_RDWR) fd = os.open(path_image, os.O_CREAT | os.O_RDWR)
os.write(fd,str(image.data)) os.write(fd,str(image.data))
os.close(fd) os.close(fd)
...@@ -78,7 +78,7 @@ class TestSafeImage(ERP5TypeTestCase): ...@@ -78,7 +78,7 @@ class TestSafeImage(ERP5TypeTestCase):
def _createTileImageTransformed(self): def _createTileImageTransformed(self):
portal = self.getPortalObject() portal = self.getPortalObject()
image = portal.restrictedTraverse('portal_skins/erp5_safeimage/img/image_unit_test.jpg') image = portal.restrictedTraverse('portal_skins/erp5_safeimage/img/image_unit_test.jpg')
path_image = "tmp/image_unit_test.jpg" path_image = "image_unit_test.jpg"
fd = os.open(path_image, os.O_CREAT | os.O_RDWR) fd = os.open(path_image, os.O_CREAT | os.O_RDWR)
os.write(fd,str(image.data)) os.write(fd,str(image.data))
os.close(fd) os.close(fd)
......
8 9
\ No newline at end of file \ No newline at end of file
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