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
67326cfa
Commit
67326cfa
authored
Jun 25, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed xmodule tests to not rely on full
Also fixed things in the toy course where needed
parent
7fb5f505
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
common/lib/xmodule/xmodule/modulestore/tests/test_xml.py
+3
-3
common/lib/xmodule/xmodule/tests/test_export.py
+0
-3
common/lib/xmodule/xmodule/tests/test_import.py
+1
-1
common/test/data/toy/chapter/handout_container.xml
+2
-1
common/test/data/toy/sequential/vertical_sequential.xml
+2
-0
common/test/data/toy/vertical/vertical_test.xml
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/tests/test_xml.py
View file @
67326cfa
...
...
@@ -24,16 +24,16 @@ class TestXMLModuleStore(object):
# uniquification of names, would raise a UnicodeError. It no longer does.
# Ensure that there really is a non-ASCII character in the course.
with
open
(
os
.
path
.
join
(
DATA_DIR
,
"
full/sequential/Administrivia_and_Circuit_Elements
.xml"
))
as
xmlf
:
with
open
(
os
.
path
.
join
(
DATA_DIR
,
"
toy/sequential/vertical_sequential
.xml"
))
as
xmlf
:
xml
=
xmlf
.
read
()
with
assert_raises
(
UnicodeDecodeError
):
xml
.
decode
(
'ascii'
)
# Load the course, but don't make error modules. This will succeed,
# but will record the errors.
modulestore
=
XMLModuleStore
(
DATA_DIR
,
course_dirs
=
[
'
full
'
],
load_error_modules
=
False
)
modulestore
=
XMLModuleStore
(
DATA_DIR
,
course_dirs
=
[
'
toy
'
],
load_error_modules
=
False
)
# Look up the errors during load. There should be none.
location
=
CourseDescriptor
.
id_to_location
(
"edX/
full/6.002_Spring_2012
"
)
location
=
CourseDescriptor
.
id_to_location
(
"edX/
toy/2012_Fall
"
)
errors
=
modulestore
.
get_item_errors
(
location
)
assert
errors
==
[]
common/lib/xmodule/xmodule/tests/test_export.py
View file @
67326cfa
...
...
@@ -116,9 +116,6 @@ class RoundTripTestCase(unittest.TestCase):
def
test_simple_roundtrip
(
self
):
self
.
check_export_roundtrip
(
DATA_DIR
,
"simple"
)
def
test_full_roundtrip
(
self
):
self
.
check_export_roundtrip
(
DATA_DIR
,
"full"
)
def
test_conditional_and_poll_roundtrip
(
self
):
self
.
check_export_roundtrip
(
DATA_DIR
,
"conditional_and_poll"
)
...
...
common/lib/xmodule/xmodule/tests/test_import.py
View file @
67326cfa
...
...
@@ -358,7 +358,7 @@ class ImportTestCase(BaseCourseTestCase):
print
(
err
)
chapters
=
course
.
get_children
()
self
.
assertEquals
(
len
(
chapters
),
2
)
self
.
assertEquals
(
len
(
chapters
),
5
)
ch2
=
chapters
[
1
]
self
.
assertEquals
(
ch2
.
url_name
,
"secret:magic"
)
...
...
common/test/data/toy/chapter/handout_container.xml
View file @
67326cfa
<sequential>
<html>
<a
href=
"/static/handouts/sample_handout.txt"
>
handouts
</a>
<html>
<a
href=
"/static/handouts/sample_handout.txt"
>
handouts
</a>
</html>
</sequential>
\ No newline at end of file
common/test/data/toy/sequential/vertical_sequential.xml
View file @
67326cfa
<sequential>
<vertical
filename=
"vertical_test"
slug=
"vertical_test"
/>
<html
slug=
"unicode"
>
…
</html>
</sequential>
\ No newline at end of file
common/test/data/toy/vertical/vertical_test.xml
View file @
67326cfa
<sequential>
<poll_question
name=
"T1_changemind_poll_foo"
display_name=
"Change your answer"
reset=
"false"
>
<poll_question
name=
"T1_changemind_poll_foo
_2
"
display_name=
"Change your answer"
reset=
"false"
>
<p>
Have you changed your mind?
</p>
<answer
id=
"yes"
>
Yes
</answer>
<answer
id=
"no"
>
No
</answer>
...
...
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