Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
erp5
Commits
2e3d68b6
Commit
2e3d68b6
authored
Nov 30, 2012
by
Pere Cortes
Committed by
Sebastien Robin
Jan 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup added in testSafeImage
parent
461045dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
bt5/erp5_safeimage/TestTemplateItem/testSafeImage.py
bt5/erp5_safeimage/TestTemplateItem/testSafeImage.py
+8
-4
bt5/erp5_safeimage/bt/revision
bt5/erp5_safeimage/bt/revision
+1
-1
erp5_javascript_openlayers/bt/revision
erp5_javascript_openlayers/bt/revision
+1
-1
No files found.
bt5/erp5_safeimage/TestTemplateItem/testSafeImage.py
View file @
2e3d68b6
...
@@ -47,7 +47,7 @@ class TestSafeImage(ERP5TypeTestCase):
...
@@ -47,7 +47,7 @@ class TestSafeImage(ERP5TypeTestCase):
if
getattr
(
self
.
image_module
,
'testTileTransformed'
,
None
)
is
not
None
:
if
getattr
(
self
.
image_module
,
'testTileTransformed'
,
None
)
is
not
None
:
self
.
image_module
.
manage_delObjects
(
ids
=
[
'testTileTransformed'
])
self
.
image_module
.
manage_delObjects
(
ids
=
[
'testTileTransformed'
])
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
def
_createImage
(
self
):
def
_createImage
(
self
):
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
...
@@ -62,7 +62,7 @@ class TestSafeImage(ERP5TypeTestCase):
...
@@ -62,7 +62,7 @@ class TestSafeImage(ERP5TypeTestCase):
tile
=
self
.
image_module
.
newContent
(
portal_type
=
'Image Tile'
,
title
=
'testTile'
,
tile
=
self
.
image_module
.
newContent
(
portal_type
=
'Image Tile'
,
title
=
'testTile'
,
id
=
'testTile'
,
file
=
tile_image
,
filename
=
'testTile'
)
id
=
'testTile'
,
file
=
tile_image
,
filename
=
'testTile'
)
return
tile
return
tile
def
_createTileImageTransformed
(
self
):
def
_createTileImageTransformed
(
self
):
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
tile_image_transformed
=
makeFileUpload
(
'image_test.jpg'
)
tile_image_transformed
=
makeFileUpload
(
'image_test.jpg'
)
...
@@ -70,14 +70,14 @@ class TestSafeImage(ERP5TypeTestCase):
...
@@ -70,14 +70,14 @@ class TestSafeImage(ERP5TypeTestCase):
title
=
'testTileTransformed'
,
id
=
'testTileTransformed'
,
title
=
'testTileTransformed'
,
id
=
'testTileTransformed'
,
file
=
tile_image_transformed
,
filename
=
'testTileTransformed'
)
file
=
tile_image_transformed
,
filename
=
'testTileTransformed'
)
return
tile_transformed
return
tile_transformed
def
test_01_CreateImage
(
self
):
def
test_01_CreateImage
(
self
):
image
=
self
.
_createImage
()
image
=
self
.
_createImage
()
self
.
assertTrue
(
image
.
hasData
())
self
.
assertTrue
(
image
.
hasData
())
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
self
.
assertNotEqual
(
image
,
None
)
self
.
assertNotEqual
(
image
,
None
)
def
test_02_CreateTileImage
(
self
):
def
test_02_CreateTileImage
(
self
):
""""
""""
We are going to check that tile image has following structure
We are going to check that tile image has following structure
...
@@ -140,3 +140,7 @@ class TestSafeImage(ERP5TypeTestCase):
...
@@ -140,3 +140,7 @@ class TestSafeImage(ERP5TypeTestCase):
self
.
assertTrue
(
x
.
hasData
())
self
.
assertTrue
(
x
.
hasData
())
self
.
assertEquals
(
123
,
image_group
[
'0-0-0'
].
getHeight
())
self
.
assertEquals
(
123
,
image_group
[
'0-0-0'
].
getHeight
())
self
.
assertEquals
(
165
,
image_group
[
'0-0-0'
].
getWidth
())
self
.
assertEquals
(
165
,
image_group
[
'0-0-0'
].
getWidth
())
if
getattr
(
self
.
image_module
,
'testTileTransformed'
,
None
)
is
not
None
:
self
.
image_module
.
manage_delObjects
(
ids
=
[
'testTileTransformed'
])
transaction
.
commit
()
self
.
tic
()
bt5/erp5_safeimage/bt/revision
View file @
2e3d68b6
4
5
\ No newline at end of file
\ No newline at end of file
erp5_javascript_openlayers/bt/revision
View file @
2e3d68b6
3
4
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment