Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d9d151b3
Commit
d9d151b3
authored
Apr 04, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1768 from MITx/fix/diana/input-state-tests
Tests to make sure that input_states have the correct keys
parents
ff8dca94
42614c69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
common/lib/xmodule/xmodule/tests/test_capa_module.py
+13
-0
No files found.
common/lib/xmodule/xmodule/tests/test_capa_module.py
View file @
d9d151b3
...
...
@@ -838,6 +838,19 @@ class CapaModuleTest(unittest.TestCase):
# Assert that the encapsulated html contains the original html
self
.
assertTrue
(
html
in
html_encapsulated
)
def
test_input_state_consistency
(
self
):
module1
=
CapaFactory
.
create
()
module2
=
CapaFactory
.
create
()
# check to make sure that the input_state and the keys have the same values
module1
.
set_state_from_lcp
()
self
.
assertEqual
(
module1
.
lcp
.
inputs
.
keys
(),
module1
.
input_state
.
keys
())
module2
.
set_state_from_lcp
()
intersection
=
set
(
module2
.
input_state
.
keys
())
.
intersection
(
set
(
module1
.
input_state
.
keys
()))
self
.
assertEqual
(
len
(
intersection
),
0
)
def
test_get_problem_html_error
(
self
):
"""
In production, when an error occurs with the problem HTML
...
...
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