Commit b209018c by Vik Paruchuri

Adding tests

parent 6cdc4150
......@@ -311,3 +311,10 @@ class ImportTestCase(unittest.TestCase):
system = self.get_system(False)
self.assertRaises(etree.XMLSyntaxError, system.process_xml, bad_xml)
def test_selfassessment_import_export(self):
'''
Check to see if definition_from_xml and definition_to_xml in self_assessment_module.py function.
'''
This is a very very simple course, useful for debugging self assessment code.
roots/2012_Fall.xml
\ No newline at end of file
<course>
<chapter url_name="Overview">
<html url_name="Welcome"/>
<selfassessment url_name="SampleQuestion"/>
</chapter>
</course>
<html>
<head>
</head>
<body>
Hello and welcome to the test course for self assessment.
</body>
</html>
{
"course/2012_Fall": {
"graceperiod": "2 days 5 hours 59 minutes 59 seconds",
"start": "2015-07-17T12:00",
"display_name": "Toy Course",
"graded": "true"
},
"chapter/Overview": {
"display_name": "Overview"
},
"videosequence/Toy_Videos": {
"display_name": "Toy Videos",
"format": "Lecture Sequence"
},
"html/secret:toylab": {
"display_name": "Toy lab"
},
"video/Video_Resources": {
"display_name": "Video Resources"
},
"video/Welcome": {
"display_name": "Welcome"
}
}
<course org="edX" course="sa_test" url_name="2012_Fall"/>
<selfassessment attempts='10'>
<prompt>
What is the meaning of life?
</prompt>
<rubric>
This is a rubric.
</rubric>
<submitmessage>
Thanks for your submission!
</submitmessage>
<hintmessage>
Enter a hint below:
</hintmessage>
</selfassessment>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment