Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs-appstore
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
Romain Courteaud
officejs-appstore
Commits
dc2a5acd
Commit
dc2a5acd
authored
Jan 09, 2018
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[officejs_test] fix tests
Remove charset format for content type Add hash when necessary /reviewed-on
!1
parent
1c3fad1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
bt5/officejs_test/TestTemplateItem/portal_components/test.erp5.testOfficeJSScenario.py
...eItem/portal_components/test.erp5.testOfficeJSScenario.py
+24
-24
No files found.
bt5/officejs_test/TestTemplateItem/portal_components/test.erp5.testOfficeJSScenario.py
View file @
dc2a5acd
...
...
@@ -129,9 +129,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
'max-age=0, public, must-revalidate'
)
self
.
assert
Equals
(
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
self
.
assert
True
(
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
response
.
getheader
(
'Content-Type'
)
)
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
...
...
@@ -142,7 +142,7 @@ class TestOfficeJSScenario(SecurityTestCase):
'SAMEORIGIN'
)
self
.
assertEquals
(
response
.
getheader
(
'Vary'
),
response
.
getheader
(
'Vary'
)
.
replace
(
' '
,
''
)
,
'Accept-Language,Cookie,Authorization,Accept-Encoding'
)
...
...
@@ -157,14 +157,14 @@ class TestOfficeJSScenario(SecurityTestCase):
page_content
=
response
.
read
()
self
.
assertEquals
(
"""CACHE MANIFEST
# development"""
,
# development
+ hash
"""
,
page_content
)
self
.
assertEquals
(
response
.
status
,
200
)
self
.
assert
Equals
(
response
.
getheader
(
'Content-Type'
),
'text/cache-manifest; charset=utf-8'
self
.
assert
True
(
'text/cache-manifest;'
in
response
.
getheader
(
'Content-Type'
),
response
.
getheader
(
'Content-Type'
)
)
self
.
assertEquals
(
response
.
getheader
(
'Cache-Control'
),
...
...
@@ -189,9 +189,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
'max-age=31536000, stale-while-revalidate=31536000, stale-if-error=31536000, public'
)
self
.
assert
Equals
(
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
self
.
assert
True
(
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
response
.
getheader
(
'Content-Type'
)
)
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
...
...
@@ -243,9 +243,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
'max-age=0, public, must-revalidate'
)
self
.
assert
Equals
(
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
self
.
assert
True
(
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
response
.
getheader
(
'Content-Type'
)
)
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
...
...
@@ -256,7 +256,7 @@ class TestOfficeJSScenario(SecurityTestCase):
'SAMEORIGIN'
)
self
.
assertEquals
(
response
.
getheader
(
'Vary'
),
response
.
getheader
(
'Vary'
)
.
replace
(
' '
,
''
)
,
'Accept-Language,Cookie,Authorization,Accept-Encoding'
)
...
...
@@ -279,7 +279,7 @@ class TestOfficeJSScenario(SecurityTestCase):
page_content
=
response
.
read
()
self
.
assertTrue
(
'document.location.replace("%s/")'
%
web_section
.
getId
()
in
page_content
,
'document.location.replace("%s/"
+ document.location.hash
)'
%
web_section
.
getId
()
in
page_content
,
page_content
)
self
.
assertTrue
(
...
...
@@ -291,9 +291,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
'max-age=0, public, must-revalidate'
)
self
.
assert
Equals
(
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
self
.
assert
True
(
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
response
.
getheader
(
'Content-Type'
)
)
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
...
...
@@ -304,7 +304,7 @@ class TestOfficeJSScenario(SecurityTestCase):
'SAMEORIGIN'
)
self
.
assertEquals
(
response
.
getheader
(
'Vary'
),
response
.
getheader
(
'Vary'
)
.
replace
(
' '
,
''
)
,
'Accept-Language,Cookie,Authorization,Accept-Encoding'
)
...
...
@@ -318,14 +318,14 @@ class TestOfficeJSScenario(SecurityTestCase):
page_content
=
response
.
read
()
self
.
assertEquals
(
"""CACHE MANIFEST
# %s"""
%
web_section
.
getId
(),
# %s
+ hash
"""
%
web_section
.
getId
(),
page_content
)
self
.
assertEquals
(
response
.
status
,
200
)
self
.
assert
Equals
(
response
.
getheader
(
'Content-Type'
),
'text/cache-manifest; charset=utf-8'
self
.
assert
True
(
'text/cache-manifest;'
in
response
.
getheader
(
'Content-Type'
),
response
.
getheader
(
'Content-Type'
)
)
self
.
assertEquals
(
response
.
getheader
(
'Cache-Control'
),
...
...
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