Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cloudooo
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
Tristan Cavelier
cloudooo
Commits
30b04e98
Commit
30b04e98
authored
Jun 10, 2011
by
Priscila Manhaes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor to test all types that getallowedlist should return
parent
61bc7db2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
cloudooo/handler/ooo/tests/testOooServer.py
cloudooo/handler/ooo/tests/testOooServer.py
+25
-3
No files found.
cloudooo/handler/ooo/tests/testOooServer.py
View file @
30b04e98
...
...
@@ -412,9 +412,31 @@ class TestServer(TestCase):
response_code
,
response_dict
,
response_message
=
\
self
.
proxy
.
getAllowedTargetItemList
(
mimetype
)
self
.
assertEquals
(
response_code
,
200
)
self
.
assertEquals
(
len
(
response_dict
[
'response_data'
]),
17
)
self
.
assertTrue
([
'html'
,
'HTML Document (OpenOffice.org Writer)'
]
in
response_dict
[
'response_data'
])
self
.
assertFalse
([
'html'
,
'HTML Document'
]
in
response_dict
[
'response_data'
])
list_for_mimetype
=
[[
'html'
,
'HTML Document (OpenOffice.org Writer)'
],
[
'txt'
,
'Text'
],
[
'doc'
,
'Microsoft Word 6.0'
],
[
'sdw'
,
'StarWriter 3.0'
],
[
'sdw'
,
'StarWriter 5.0'
],
[
'doc'
,
'Microsoft Word 95'
],
[
'doc'
,
'Microsoft Word 97/2000/XP'
],
[
'ott'
,
'ODF Text Document Template'
],
[
'sdw'
,
'StarWriter 4.0'
],
[
'rtf'
,
'Rich Text Format'
],
[
'docx'
,
'Microsoft Word 2007 XML'
],
[
'sxw'
,
'OpenOffice.org 1.0 Text Document'
],
[
'txt'
,
'Text Encoded'
],
[
'docx'
,
'Office Open XML Text'
],
[
'odt'
,
'ODF Text Document'
],
[
'pdf'
,
'PDF - Portable Document Format'
]
]
# Verify if all expected types are in response list
for
arg
in
list_for_mimetype
:
self
.
assertTrue
(
arg
in
response_dict
[
'response_data'
],
"%s not in %s"
%
(
arg
,
response_dict
[
'response_data'
]))
# Verify if all types in response list are expected
for
arg
in
response_dict
[
'response_data'
]:
self
.
assertTrue
(
arg
in
list_for_mimetype
,
"%s not in %s"
%
(
arg
,
list_for_mimetype
))
def
testGetTableItemListFromOdt
(
self
):
"""Test if getTableItemList can get the table item list from odt 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