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
78424e16
Commit
78424e16
authored
Mar 06, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some of the tests so that they work with the new changes
to capa_problem
parent
17680a33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
common/lib/xmodule/xmodule/tests/test_capa_module.py
+4
-1
common/lib/xmodule/xmodule/tests/test_conditional.py
+1
-1
No files found.
common/lib/xmodule/xmodule/tests/test_capa_module.py
View file @
78424e16
...
@@ -108,7 +108,9 @@ class CapaFactory(object):
...
@@ -108,7 +108,9 @@ class CapaFactory(object):
else
:
else
:
instance_state
=
None
instance_state
=
None
module
=
CapaModule
(
test_system
(),
location
,
system
=
test_system
()
system
.
render_template
=
Mock
(
return_value
=
"<div>Test Template HTML</div>"
)
module
=
CapaModule
(
system
,
location
,
definition
,
descriptor
,
definition
,
descriptor
,
instance_state
,
None
,
metadata
=
metadata
)
instance_state
,
None
,
metadata
=
metadata
)
...
@@ -185,6 +187,7 @@ class CapaModuleTest(unittest.TestCase):
...
@@ -185,6 +187,7 @@ class CapaModuleTest(unittest.TestCase):
max_attempts
=
"1"
,
max_attempts
=
"1"
,
attempts
=
"0"
,
attempts
=
"0"
,
due
=
self
.
yesterday_str
)
due
=
self
.
yesterday_str
)
self
.
assertTrue
(
after_due_date
.
answer_available
())
self
.
assertTrue
(
after_due_date
.
answer_available
())
...
...
common/lib/xmodule/xmodule/tests/test_conditional.py
View file @
78424e16
...
@@ -106,7 +106,7 @@ class ConditionalModuleTest(unittest.TestCase):
...
@@ -106,7 +106,7 @@ class ConditionalModuleTest(unittest.TestCase):
html
=
module
.
get_html
()
html
=
module
.
get_html
()
print
"html type: "
,
type
(
html
)
print
"html type: "
,
type
(
html
)
print
"html: "
,
html
print
"html: "
,
html
html_expect
=
"
<div>{'ajax_url': 'courses/course_id/modx/a_location', 'element_id': 'i4x-edX-cond_test-conditional-condone', 'id': 'i4x://edX/cond_test/conditional/condone'}</div>
"
html_expect
=
"
{'ajax_url': 'courses/course_id/modx/a_location', 'element_id': 'i4x-edX-cond_test-conditional-condone', 'id': 'i4x://edX/cond_test/conditional/condone'}
"
self
.
assertEqual
(
html
,
html_expect
)
self
.
assertEqual
(
html
,
html_expect
)
gdi
=
module
.
get_display_items
()
gdi
=
module
.
get_display_items
()
...
...
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