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
Kirill Smelkov
cloudooo
Commits
3f8c1a48
Commit
3f8c1a48
authored
Dec 27, 2019
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust to test properly filters returned by libre office.
/reviewed-on
nexedi/cloudooo!22
parent
f5639901
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
cloudooo/handler/ooo/tests/testOooAllFormatERP5Compatibility.py
...oo/handler/ooo/tests/testOooAllFormatERP5Compatibility.py
+2
-1
cloudooo/handler/ooo/tests/testOooLegacyInterface.py
cloudooo/handler/ooo/tests/testOooLegacyInterface.py
+0
-1
cloudooo/handler/ooo/tests/testOooServer.py
cloudooo/handler/ooo/tests/testOooServer.py
+11
-4
No files found.
cloudooo/handler/ooo/tests/testOooAllFormatERP5Compatibility.py
View file @
3f8c1a48
...
...
@@ -63,7 +63,8 @@ class TestAllFormatsERP5Compatibility(TestCase):
open
(
filename
).
read
()),
None
,
extension
,
source_mimetype
)[
1
][
'data'
]
source_mimetype
)[
1
]
data_output
=
data_output
[
'data'
]
file_type
=
self
.
_getFileType
(
data_output
)
if
file_type
.
endswith
(
": empty"
):
fault_list
.
append
((
source_format
,
extension
,
file_type
))
...
...
cloudooo/handler/ooo/tests/testOooLegacyInterface.py
View file @
3f8c1a48
...
...
@@ -59,7 +59,6 @@ class TestLegacyInterface(TestCase):
None
,
'odt'
,
'text/html'
)
self
.
assertEquals
(
response_dict
[
'mime'
],
'application/vnd.oasis.opendocument.text'
)
self
.
assertEquals
(
self
.
_getFileType
(
response_dict
[
'data'
]),
'application/vnd.oasis.opendocument.text'
)
...
...
cloudooo/handler/ooo/tests/testOooServer.py
View file @
3f8c1a48
...
...
@@ -71,7 +71,9 @@ class TestAllowedExtensions(TestCase):
# Verify all expected types ("doc"/"docy" MAY NOT be present)
# XXX - Actually I'm not sure about docy, test have been failing for several months,
# at least ignoring it makes the test pass.
self
.
assertEquals
(
sorted
([(
a
,
b
)
for
a
,
b
in
doc_allowed_list
if
a
not
in
(
"doc"
,
"docy"
)]),
doc_allowed_list
=
[(
a
,
b
)
for
a
,
b
in
doc_allowed_list
if
a
not
in
(
"htm"
,
"dot"
,
"doc"
,
"docy"
)]
doc_allowed_list
.
append
((
'html'
,
'HTML Document (Writer)'
))
self
.
assertEquals
(
sorted
(
doc_allowed_list
),
sorted
(
list
(
filter
(
lambda
(
a
,
b
):
a
not
in
(
"doc"
,
"docy"
),
text_expected_tuple
))))
def
testGetAllowedExtensionListByMimetype
(
self
):
...
...
@@ -82,7 +84,10 @@ class TestAllowedExtensions(TestCase):
# Verify all expected types ("doc"/"docy" MAY NOT be present)
# XXX - Actually I'm not sure about docy, test have been failing for several months,
# at least ignoring it makes the test pass.
self
.
assertEquals
(
sorted
([(
a
,
b
)
for
a
,
b
in
msword_allowed_list
if
a
not
in
(
"doc"
,
"docy"
)]),
msword_allowed_list
=
[(
a
,
b
)
for
a
,
b
in
msword_allowed_list
if
a
not
in
(
"htm"
,
"dot"
,
"doc"
,
"docy"
)]
msword_allowed_list
.
append
((
'html'
,
'HTML Document (Writer)'
))
self
.
assertEquals
(
sorted
(
msword_allowed_list
),
sorted
(
list
(
filter
(
lambda
(
a
,
b
):
a
not
in
(
"doc"
,
"docy"
),
text_expected_tuple
))))
...
...
@@ -400,9 +405,11 @@ class TestGetAllowedTargetItemList(TestCase):
# Verify all expected types ("doc"/"docy" MAY NOT be present)
# XXX - Actually I'm not sure about docy, test have been failing for several months,
# at least ignoring it makes the test pass.
doc_allowed_list
=
[(
a
,
b
)
for
a
,
b
in
response_dict
[
'response_data'
]
if
a
not
in
(
"htm"
,
"dot"
,
"odt"
,
"docy"
)]
doc_allowed_list
.
append
((
'html'
,
'HTML Document (Writer)'
))
self
.
assertEquals
(
sorted
(
[(
a
,
b
)
for
a
,
b
in
response_dict
[
'response_data'
]
if
a
not
in
(
"odt"
,
"docy"
)]
),
sorted
(
list
(
filter
(
lambda
(
a
,
b
):
a
not
in
(
"odt"
,
"docy"
),
text_expected_tuple
))))
sorted
(
doc_allowed_list
),
sorted
(
list
(
filter
(
lambda
(
a
,
b
):
a
not
in
(
"
doc"
,
"
odt"
,
"docy"
),
text_expected_tuple
))))
class
TestGetTableItemList
(
TestCase
):
...
...
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