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
3e62c5e2
Commit
3e62c5e2
authored
Sep 10, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaner tests
parent
9d3395ea
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
22 additions
and
66 deletions
+22
-66
common/lib/xmodule/xmodule/seq_module.py
+1
-1
common/lib/xmodule/xmodule/tests/test_import.py
+8
-18
common/test/data/test_unicode/chapter/handout_container.xml
+0
-4
common/test/data/test_unicode/chapter/poll_test.xml
+0
-8
common/test/data/test_unicode/chapter/secret/magic.xml
+0
-3
common/test/data/test_unicode/chapter/simple_html.xml
+8
-0
common/test/data/test_unicode/course/2012_Fall.xml
+2
-14
common/test/data/test_unicode/info/handouts.html
+0
-2
common/test/data/test_unicode/policies/2012_Fall.json
+2
-12
common/test/data/test_unicode/static/handouts/sample_handout.txt
+0
-0
common/test/data/test_unicode/static/sample_static.txt
+0
-0
common/test/data/test_unicode/static_import/∫hould_be_imπorted.html
+1
-2
common/test/data/test_unicode/tabs/syllabus.html
+0
-1
common/test/data/test_unicode/video/a_video.xml
+0
-1
No files found.
common/lib/xmodule/xmodule/seq_module.py
View file @
3e62c5e2
...
...
@@ -133,7 +133,7 @@ class SequenceDescriptor(SequenceFields, MakoModuleDescriptor, XmlDescriptor):
except
Exception
as
e
:
log
.
exception
(
"Unable to load child when parsing Sequence. Continuing..."
)
if
system
.
error_tracker
is
not
None
:
system
.
error_tracker
(
"ERROR: "
+
str
(
e
))
system
.
error_tracker
(
"ERROR: "
+
unicode
(
e
))
continue
return
{},
children
...
...
common/lib/xmodule/xmodule/tests/test_import.py
View file @
3e62c5e2
...
...
@@ -380,32 +380,22 @@ class ImportTestCase(BaseCourseTestCase):
courses
=
modulestore
.
get_courses
()
self
.
assertEquals
(
len
(
courses
),
1
)
course
=
courses
[
0
]
course_id
=
course
.
id
print
(
"course errors:"
)
# Expect to find an error/exception about characters in "®esources"
found
=
False
expect
=
"Invalid characters in '®esources'"
for
(
msg
,
err
)
in
modulestore
.
get_item_errors
(
course
.
location
):
msg_u
=
msg
.
encode
(
"utf-8"
)
err_u
=
err
.
encode
(
"utf-8"
)
print
(
msg_u
)
print
(
err_u
)
if
max
(
msg_u
.
find
(
expect
),
err_u
.
find
(
expect
))
>=
1
:
found
=
True
self
.
assertTrue
(
found
)
chapters
=
course
.
get_children
()
self
.
assertEquals
(
len
(
chapters
),
5
)
errors
=
[(
msg
.
encode
(
"utf-8"
),
err
.
encode
(
"utf-8"
))
for
msg
,
err
in
modulestore
.
get_item_errors
(
course
.
location
)]
ch2
=
chapters
[
1
]
self
.
assertEquals
(
ch2
.
url_name
,
"secret:magic"
)
self
.
assertTrue
(
any
(
expect
in
msg
or
expect
in
err
for
msg
,
err
in
errors
))
chapters
=
course
.
get_children
()
self
.
assertEqual
(
len
(
chapters
),
3
)
print
(
"Ch2 location: "
,
ch2
.
location
)
ch3
=
chapters
[
2
]
also_ch2
=
modulestore
.
get_instance
(
course_id
,
ch2
.
location
)
self
.
assertEquals
(
ch2
,
also_ch2
)
def
test_url_name_mangling
(
self
):
"""
...
...
common/test/data/test_unicode/chapter/handout_container.xml
deleted
100644 → 0
View file @
9d3395ea
<sequential>
<html>
<a
href=
"/static/handouts/sample_handout.txt"
>
handouts
</a>
</html>
</sequential>
\ No newline at end of file
common/test/data/test_unicode/chapter/poll_test.xml
deleted
100644 → 0
View file @
9d3395ea
<sequential>
<poll_question
name=
"T1_changemind_poll_foo"
display_name=
"Change your answer"
reset=
"false"
>
<p>
Have you changed your mind?
</p>
<answer
id=
"yes"
>
Yes
</answer>
<answer
id=
"no"
>
No
</answer>
</poll_question>
</sequential>
\ No newline at end of file
common/test/data/test_unicode/chapter/secret/magic.xml
deleted
100644 → 0
View file @
9d3395ea
<chapter>
<video
url_name=
"toyvideo"
youtube_id_1_0=
"OEoXaMPEzfMA"
display_name=
"toyvideo"
/>
</chapter>
common/test/data/test_unicode/chapter/simple_html.xml
0 → 100644
View file @
3e62c5e2
<chapter
display_name=
"åñ html ƒile"
>
<sequential
display_name=
"åñ html ƒile"
>
<html
display_name=
"åñ html ƒile"
>
<p>
This is upside down text:
</p>
<p>
˙ʇxəʇ uʍop əpısdn sı sıɥʇ
</p>
</html>
</sequential>
</chapter>
common/test/data/test_unicode/course/2012_Fall.xml
View file @
3e62c5e2
<course>
<textbook
title=
"Textbook"
book_url=
"https://s3.amazonaws.com/edx-textbooks/guttag_computation_v3/"
/>
<chapter
display_name=
"Overview"
>
<videosequence
url_name=
"Toy_Videos"
>
<html
url_name=
"secret:toylab"
/>
<html
url_name=
"toyjumpto"
/>
<html
url_name=
"toyhtml"
/>
<html
url_name=
"nonportable"
/>
<html
url_name=
"nonportable_link"
/>
<video
url_name=
"Video_Resources"
youtube_id_1_0=
"1bK-WdDi6Qw"
display_name=
"Video Resources"
/>
</videosequence>
<video
url_name=
"Welcome"
youtube_id_1_0=
"p2Q6BrNhdh8"
display_name=
"Welcome"
/>
<video
url_name=
"video_123456789012"
youtube_id_1_0=
"p2Q6BrNhdh8"
display_name=
'Test Video'
/>
<video
url_name=
"video_4f66f493ac8f"
youtube_id_1_0=
"p2Q6BrNhdh8"
/>
</chapter>
<chapter
url_name=
"s
ecret:magic
"
/>
<chapter
url_name=
"
poll_test
"
/>
<chapter
url_name=
"s
împle_√ideo
"
/>
<chapter
url_name=
"
simple_html
"
/>
<chapter
url_name=
"vertical_container"
/>
<chapter
url_name=
"handout_container"
/>
</course>
common/test/data/test_unicode/info/handouts.html
deleted
100644 → 0
View file @
9d3395ea
<a
href=
'/static/handouts/sample_handout.txt'
>
Sample
</a>
\ No newline at end of file
common/test/data/test_unicode/policies/2012_Fall.json
View file @
3e62c5e2
...
...
@@ -2,13 +2,13 @@
"course/2012_Fall"
:
{
"graceperiod"
:
"2 days 5 hours 59 minutes 59 seconds"
,
"start"
:
"2015-07-17T12:00"
,
"display_name"
:
"
Toy
Course"
,
"display_name"
:
"
Üñîçø∂e †es†
Course"
,
"graded"
:
"true"
,
"tabs"
:
[
{
"type"
:
"courseware"
},
{
"type"
:
"course_info"
,
"name"
:
"Course Info"
},
{
"type"
:
"static_tab"
,
"url_slug"
:
"syllabus"
,
"name"
:
"ßyllabus"
},
{
"type"
:
"static_tab"
,
"url_slug"
:
"resources"
,
"name"
:
"
R
esources"
},
{
"type"
:
"static_tab"
,
"url_slug"
:
"resources"
,
"name"
:
"
®
esources"
},
{
"type"
:
"discussion"
,
"name"
:
"∂iscussion"
},
{
"type"
:
"wiki"
,
"name"
:
"∑iki"
},
{
"type"
:
"progress"
,
"name"
:
"πrogress"
}
...
...
@@ -17,16 +17,6 @@
"chapter/Overview"
:
{
"display_name"
:
"O√erview"
},
"videosequence/Toy_Videos"
:
{
"display_name"
:
"†oy Videos"
,
"format"
:
"Lecture Sequence"
},
"html/secret:toylab"
:
{
"display_name"
:
"Toy lab"
},
"video/Video_Resources"
:
{
"display_name"
:
"Video Resources"
},
"video/Welcome"
:
{
"display_name"
:
"Welcome"
}
...
...
common/test/data/test_unicode/static/handouts/sample_handout.txt
deleted
100644 → 0
View file @
9d3395ea
common/test/data/test_unicode/static/sample_static.txt
deleted
100644 → 0
View file @
9d3395ea
common/test/data/test_unicode/static_import/∫hould_be_imπorted.html
deleted
100644 → 0
View file @
9d3395ea
<p>
this ƒîlë should be in the contentstore
</p>
++ /dev/null
<p>
this ƒîlë should be in the contentstore
</p>
common/test/data/test_unicode/tabs/syllabus.html
deleted
100644 → 0
View file @
9d3395ea
<h1>
This is a syllabus
</h1>
common/test/data/test_unicode/video/a_video.xml
deleted
100644 → 0
View file @
9d3395ea
<video
display_name=
"default"
youtube_id_0_75=
"JMD_ifUUfsU"
youtube_id_1_0=
"OEoXaMPEzfM"
youtube_id_1_25=
"AKqURZnYqpk"
youtube_id_1_5=
"DYpADpL7jAY"
name=
"sample_video"
/>
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