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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
9c66146f
Commit
9c66146f
authored
Sep 19, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Base_isConvertible unit test
parent
bb669f59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
product/ERP5OOo/tests/testDmsWithPreConversion.py
product/ERP5OOo/tests/testDmsWithPreConversion.py
+16
-3
No files found.
product/ERP5OOo/tests/testDmsWithPreConversion.py
View file @
9c66146f
...
@@ -72,15 +72,28 @@ class TestDocumentWithPreConversion(TestDocument):
...
@@ -72,15 +72,28 @@ class TestDocumentWithPreConversion(TestDocument):
reference
=
'Embedded-XXX'
,
reference
=
'Embedded-XXX'
,
version
=
'001'
,
version
=
'001'
,
language
=
'en'
)
language
=
'en'
)
# empty image is not convertible
self
.
assertEqual
(
False
,
image
.
Base_isConvertible
())
#
image with data is
convertible
#
draft image is not
convertible
upload_file
=
makeFileUpload
(
'cmyk_sample.jpg'
)
upload_file
=
makeFileUpload
(
'cmyk_sample.jpg'
)
image
.
edit
(
file
=
upload_file
)
image
.
edit
(
file
=
upload_file
)
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
False
,
image
.
Base_isConvertible
())
# published image with data is convertible
image
.
publish
()
self
.
tic
()
self
.
assertEqual
(
True
,
image
.
Base_isConvertible
())
self
.
assertEqual
(
True
,
image
.
Base_isConvertible
())
image
=
self
.
portal
.
image_module
.
newContent
(
portal_type
=
'Image'
,
reference
=
'Embedded-YYY'
,
version
=
'001'
,
language
=
'en'
)
image
.
publish
()
self
.
tic
()
# published empty image is not convertible
self
.
assertEqual
(
False
,
image
.
Base_isConvertible
())
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestDocumentWithPreConversion
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestDocumentWithPreConversion
))
...
...
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