Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
49e66863
Commit
49e66863
authored
8 years ago
by
Diana Huang
Browse files
Options
Downloads
Plain Diff
Merge pull request #12512 from edx/diana/enable-verify-xss
turn on bok choy XSS checking
parents
d95ad325
1162dbc1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pavelib/paver_tests/test_paver_bok_choy_cmds.py
+3
-3
3 additions, 3 deletions
pavelib/paver_tests/test_paver_bok_choy_cmds.py
pavelib/utils/test/suites/bokchoy_suite.py
+1
-1
1 addition, 1 deletion
pavelib/utils/test/suites/bokchoy_suite.py
with
4 additions
and
4 deletions
pavelib/paver_tests/test_paver_bok_choy_cmds.py
+
3
−
3
View file @
49e66863
...
...
@@ -18,7 +18,7 @@ class TestPaverBokChoyCmd(unittest.TestCase):
Paver Bok Choy Command test cases
"""
def
_expected_command
(
self
,
name
,
store
=
None
,
verify_xss
=
Fals
e
):
def
_expected_command
(
self
,
name
,
store
=
None
,
verify_xss
=
Tru
e
):
"""
Returns the command that is expected to be run for the given test spec
and store.
...
...
@@ -101,11 +101,11 @@ class TestPaverBokChoyCmd(unittest.TestCase):
self
.
assertEqual
(
suite
.
cmd
,
self
.
_expected_command
(
name
=
name
,
verify_xss
=
True
))
def
test_verify_xss_env_var
(
self
):
self
.
env_var_override
.
set
(
'
VERIFY_XSS
'
,
'
Tru
e
'
)
self
.
env_var_override
.
set
(
'
VERIFY_XSS
'
,
'
Fals
e
'
)
with
self
.
env_var_override
:
suite
=
BokChoyTestSuite
(
''
)
name
=
'
tests
'
self
.
assertEqual
(
suite
.
cmd
,
self
.
_expected_command
(
name
=
name
,
verify_xss
=
Tru
e
))
self
.
assertEqual
(
suite
.
cmd
,
self
.
_expected_command
(
name
=
name
,
verify_xss
=
Fals
e
))
def
test_test_dir
(
self
):
test_dir
=
'
foo
'
...
...
This diff is collapsed.
Click to expand it.
pavelib/utils/test/suites/bokchoy_suite.py
+
1
−
1
View file @
49e66863
...
...
@@ -58,7 +58,7 @@ class BokChoyTestSuite(TestSuite):
self
.
default_store
=
kwargs
.
get
(
'
default_store
'
,
None
)
self
.
verbosity
=
kwargs
.
get
(
'
verbosity
'
,
DEFAULT_VERBOSITY
)
self
.
num_processes
=
kwargs
.
get
(
'
num_processes
'
,
DEFAULT_NUM_PROCESSES
)
self
.
verify_xss
=
kwargs
.
get
(
'
verify_xss
'
,
os
.
environ
.
get
(
'
VERIFY_XSS
'
,
Fals
e
))
self
.
verify_xss
=
kwargs
.
get
(
'
verify_xss
'
,
os
.
environ
.
get
(
'
VERIFY_XSS
'
,
Tru
e
))
self
.
extra_args
=
kwargs
.
get
(
'
extra_args
'
,
''
)
self
.
har_dir
=
self
.
log_dir
/
'
hars
'
self
.
a11y_file
=
Env
.
BOK_CHOY_A11Y_CUSTOM_RULES_FILE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment