Last active
August 29, 2015 14:16
-
-
Save singingwolfboy/03f47de8f32238f04dc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Test for Discussion Xmodule functional logic.""" | |
import os | |
from mock import Mock | |
from . import BaseTestXmodule, XModuleRenderingTestBase | |
from xmodule.discussion_module import DiscussionModule | |
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory | |
from courseware.module_render import get_module_for_descriptor_internal | |
class DiscussionModuleTest(BaseTestXmodule): | |
"""Logic tests for Discussion Xmodule.""" | |
CATEGORY = "discussion" | |
def test_html_with_user(self): | |
discussion = get_module_for_descriptor_internal( | |
user=self.users[0], | |
descriptor=self.item_descriptor, | |
field_data_cache=Mock(name='field_data_cache'), | |
course_id=self.course.id, | |
track_function=Mock(name='track_function'), | |
xqueue_callback_url_prefix=Mock(name='xqueue_callback_url_prefix'), | |
request_token='request_token', | |
) | |
#import nose.tools; nose.tools.set_trace() | |
html = discussion.get_html() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) ERROR: test_html_with_user (lms.djangoapps.courseware.tests.test_discussion_module.DiscussionModuleTest) | |
Traceback (most recent call last): | |
lms/djangoapps/courseware/tests/test_discussion_module.py line 27 in test_html_with_user | |
html = discussion.get_html() | |
common/lib/xmodule/xmodule/mako_module.py line 44 in get_html | |
self.mako_template, self.get_context()) | |
common/djangoapps/edxmako/shortcuts.py line 126 in render_to_string | |
template = lookup_template(namespace, template_name) | |
common/djangoapps/edxmako/paths.py line 62 in lookup_template | |
return LOOKUP[namespace].get_template(name) | |
/Users/db/.virtualenvs/edx-platform/lib/python2.7/site-packages/mako/lookup.py line 248 in get_template | |
"Cant locate template for uri %r" % uri) | |
TopLevelLookupException: Cant locate template for uri 'widgets/metadata-only-edit.html' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment