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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
erp5
Commits
009dcac9
Commit
009dcac9
authored
Jun 05, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! downloadable: Always set content-disposition: inline when displaying inline
test was lost in merge / rebase
parent
78867757
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
product/ERP5OOo/tests/testOOoStyle.py
product/ERP5OOo/tests/testOOoStyle.py
+14
-1
No files found.
product/ERP5OOo/tests/testOOoStyle.py
View file @
009dcac9
...
...
@@ -188,7 +188,7 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
assertEqual
(
'attachment'
,
content_disposition
.
split
(
';'
)[
0
])
self
.
_validate
(
response
.
getBody
())
def
test_form_view_format
(
self
):
def
test_form_view_
empty_
format
(
self
):
# empty format= does not use oood for conversion
response
=
self
.
publish
(
'/%s/person_module/pers/Person_view?format='
...
...
@@ -199,6 +199,8 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
content_disposition
=
response
.
getHeader
(
'content-disposition'
)
self
.
assertEqual
(
'attachment'
,
content_disposition
.
split
(
';'
)[
0
])
self
.
_validate
(
response
.
getBody
())
def
test_form_view_pdf_format
(
self
):
# format=pdf uses oood for conversion
response
=
self
.
publish
(
'/%s/person_module/pers/Person_view?format=pdf'
...
...
@@ -209,6 +211,17 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
content_disposition
=
response
.
getHeader
(
'content-disposition'
)
self
.
assertEqual
(
'attachment'
,
content_disposition
.
split
(
';'
)[
0
])
def
test_form_view_html_format
(
self
):
# format=html is rendered inline
response
=
self
.
publish
(
'/%s/person_module/pers/Person_view?format=html'
%
self
.
portal
.
getId
(),
self
.
auth
)
self
.
assertEqual
(
HTTP_OK
,
response
.
getStatus
())
content_type
=
response
.
getHeader
(
'content-type'
)
self
.
assertEqual
(
content_type
,
'text/html; charset=utf-8'
)
content_disposition
=
response
.
getHeader
(
'content-disposition'
)
self
.
assertEqual
(
'inline'
,
content_disposition
.
split
(
';'
)[
0
])
def
test_report_view_form_view
(
self
):
# Test report view rendering forms using form_view
self
.
assertEqual
(
'form_view'
,
self
.
portal
.
Base_viewWorkflowHistory
.
pt
)
...
...
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