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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
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):
...
@@ -129,9 +129,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
response
.
getheader
(
'Cache-Control'
),
'max-age=0, public, must-revalidate'
'max-age=0, public, must-revalidate'
)
)
self
.
assert
Equals
(
self
.
assert
True
(
response
.
getheader
(
'Content-Type'
),
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
response
.
getheader
(
'Content-Type'
)
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
response
.
getheader
(
'Content-Security-Policy'
),
...
@@ -142,7 +142,7 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -142,7 +142,7 @@ class TestOfficeJSScenario(SecurityTestCase):
'SAMEORIGIN'
'SAMEORIGIN'
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Vary'
),
response
.
getheader
(
'Vary'
)
.
replace
(
' '
,
''
)
,
'Accept-Language,Cookie,Authorization,Accept-Encoding'
'Accept-Language,Cookie,Authorization,Accept-Encoding'
)
)
...
@@ -157,14 +157,14 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -157,14 +157,14 @@ class TestOfficeJSScenario(SecurityTestCase):
page_content
=
response
.
read
()
page_content
=
response
.
read
()
self
.
assertEquals
(
"""CACHE MANIFEST
self
.
assertEquals
(
"""CACHE MANIFEST
# development"""
,
# development
+ hash
"""
,
page_content
page_content
)
)
self
.
assertEquals
(
response
.
status
,
200
)
self
.
assertEquals
(
response
.
status
,
200
)
self
.
assert
Equals
(
self
.
assert
True
(
response
.
getheader
(
'Content-Type'
),
'text/cache-manifest;'
in
response
.
getheader
(
'Content-Type'
),
'text/cache-manifest; charset=utf-8'
response
.
getheader
(
'Content-Type'
)
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Cache-Control'
),
response
.
getheader
(
'Cache-Control'
),
...
@@ -189,9 +189,9 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -189,9 +189,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
response
.
getheader
(
'Cache-Control'
),
'max-age=31536000, stale-while-revalidate=31536000, stale-if-error=31536000, public'
'max-age=31536000, stale-while-revalidate=31536000, stale-if-error=31536000, public'
)
)
self
.
assert
Equals
(
self
.
assert
True
(
response
.
getheader
(
'Content-Type'
),
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
response
.
getheader
(
'Content-Type'
)
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
response
.
getheader
(
'Content-Security-Policy'
),
...
@@ -243,9 +243,9 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -243,9 +243,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
response
.
getheader
(
'Cache-Control'
),
'max-age=0, public, must-revalidate'
'max-age=0, public, must-revalidate'
)
)
self
.
assert
Equals
(
self
.
assert
True
(
response
.
getheader
(
'Content-Type'
),
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
response
.
getheader
(
'Content-Type'
)
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
response
.
getheader
(
'Content-Security-Policy'
),
...
@@ -256,7 +256,7 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -256,7 +256,7 @@ class TestOfficeJSScenario(SecurityTestCase):
'SAMEORIGIN'
'SAMEORIGIN'
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Vary'
),
response
.
getheader
(
'Vary'
)
.
replace
(
' '
,
''
)
,
'Accept-Language,Cookie,Authorization,Accept-Encoding'
'Accept-Language,Cookie,Authorization,Accept-Encoding'
)
)
...
@@ -279,7 +279,7 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -279,7 +279,7 @@ class TestOfficeJSScenario(SecurityTestCase):
page_content
=
response
.
read
()
page_content
=
response
.
read
()
self
.
assertTrue
(
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
page_content
)
)
self
.
assertTrue
(
self
.
assertTrue
(
...
@@ -291,9 +291,9 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -291,9 +291,9 @@ class TestOfficeJSScenario(SecurityTestCase):
response
.
getheader
(
'Cache-Control'
),
response
.
getheader
(
'Cache-Control'
),
'max-age=0, public, must-revalidate'
'max-age=0, public, must-revalidate'
)
)
self
.
assert
Equals
(
self
.
assert
True
(
response
.
getheader
(
'Content-Type'
),
'text/html;'
in
response
.
getheader
(
'Content-Type'
),
'text/html; charset=utf-8'
response
.
getheader
(
'Content-Type'
)
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Content-Security-Policy'
),
response
.
getheader
(
'Content-Security-Policy'
),
...
@@ -304,7 +304,7 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -304,7 +304,7 @@ class TestOfficeJSScenario(SecurityTestCase):
'SAMEORIGIN'
'SAMEORIGIN'
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Vary'
),
response
.
getheader
(
'Vary'
)
.
replace
(
' '
,
''
)
,
'Accept-Language,Cookie,Authorization,Accept-Encoding'
'Accept-Language,Cookie,Authorization,Accept-Encoding'
)
)
...
@@ -318,14 +318,14 @@ class TestOfficeJSScenario(SecurityTestCase):
...
@@ -318,14 +318,14 @@ class TestOfficeJSScenario(SecurityTestCase):
page_content
=
response
.
read
()
page_content
=
response
.
read
()
self
.
assertEquals
(
"""CACHE MANIFEST
self
.
assertEquals
(
"""CACHE MANIFEST
# %s"""
%
web_section
.
getId
(),
# %s
+ hash
"""
%
web_section
.
getId
(),
page_content
page_content
)
)
self
.
assertEquals
(
response
.
status
,
200
)
self
.
assertEquals
(
response
.
status
,
200
)
self
.
assert
Equals
(
self
.
assert
True
(
response
.
getheader
(
'Content-Type'
),
'text/cache-manifest;'
in
response
.
getheader
(
'Content-Type'
),
'text/cache-manifest; charset=utf-8'
response
.
getheader
(
'Content-Type'
)
)
)
self
.
assertEquals
(
self
.
assertEquals
(
response
.
getheader
(
'Cache-Control'
),
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