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
Papa Tamsir Kane
erp5
Commits
4f98b14f
Commit
4f98b14f
authored
Oct 15, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic testing for Base_isConvertible.
parent
9641c1ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
product/ERP5OOo/tests/testDmsWithPreConversion.py
product/ERP5OOo/tests/testDmsWithPreConversion.py
+17
-0
No files found.
product/ERP5OOo/tests/testDmsWithPreConversion.py
View file @
4f98b14f
...
...
@@ -64,6 +64,23 @@ class TestDocumentWithPreConversion(TestDocument):
'Embedded-XXX?format=jpeg&display=large&quality=75'
],
web_page
.
Base_extractImageUrlList
())
def
test_Base_isConvertible
(
self
):
"""
Test pre converion only happens on proper documents.
"""
print
"da"
image
=
self
.
portal
.
image_module
.
newContent
(
portal_type
=
'Image'
,
reference
=
'Embedded-XXX'
,
version
=
'001'
,
language
=
'en'
)
# empty image is not convertible
self
.
assertEqual
(
False
,
image
.
Base_isConvertible
())
# image with data is convertible
upload_file
=
makeFileUpload
(
'cmyk_sample.jpg'
)
image
.
edit
(
file
=
upload_file
)
self
.
tic
()
self
.
assertEqual
(
True
,
image
.
Base_isConvertible
())
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
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