Fix toy course textbook test - use Mongo-backed test course.

This commit is contained in:
John Eskew
2015-12-22 15:26:06 -05:00
parent 20533de145
commit 74eb70aa12
3 changed files with 10 additions and 7 deletions

View File

@@ -175,7 +175,7 @@ class CourseFields(object):
scope=Scope.settings
)
textbooks = TextbookList(
help=_("List of pairs of (title, url) for textbooks used in this course"),
help=_("List of Textbook objects with (title, url) for textbooks used in this course"),
default=[],
scope=Scope.content
)

View File

@@ -25,6 +25,7 @@ from xmodule.modulestore import prefer_xmodules, ModuleStoreEnum
from xmodule.modulestore.tests.sample_courses import default_block_info_tree, TOY_BLOCK_INFO_TREE
from xmodule.tabs import CourseTab
from xmodule.x_module import DEPRECATION_VSCOMPAT_EVENT
from xmodule.course_module import Textbook
class Dummy(object):
@@ -190,7 +191,7 @@ class ToyCourseFactory(SampleCourseFactory):
fields = {
'block_info_tree': TOY_BLOCK_INFO_TREE,
'textbooks': [["Textbook", "path/to/a/text_book"]],
'textbooks': [Textbook("Textbook", "path/to/a/text_book")],
'wiki_slug': "toy",
'graded': True,
'discussion_topics': {"General": {"id": "i4x-edX-toy-course-2012_Fall"}},