Commit c05ad2a4 by Joe Blaylock

Fixing the last (?) unit test failure in rc

parent ecc619c1
""" Unit tests for utility methods in views.py. """ """ Unit tests for utility methods in views.py. """
from django.conf import settings from django.conf import settings
from contentstore.utils import get_modulestore #from contentstore.utils import get_modulestore
from xmodule.modulestore.django import modulestore
from contentstore.utils import reverse_course_url from contentstore.utils import reverse_course_url
from contentstore.views.utility import expand_utility_action_url from contentstore.views.utility import expand_utility_action_url
from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.factories import CourseFactory
...@@ -49,8 +50,9 @@ class UtilitiesTestCase(CourseTestCase): ...@@ -49,8 +50,9 @@ class UtilitiesTestCase(CourseTestCase):
# Now delete the utilities from the course and verify they get repopulated (for courses # Now delete the utilities from the course and verify they get repopulated (for courses
# created before utilities were introduced). # created before utilities were introduced).
with mock.patch('django.conf.settings.COURSE_UTILITIES', []): with mock.patch('django.conf.settings.COURSE_UTILITIES', []):
modulestore = get_modulestore(self.course.location) #modulestore = get_modulestore(self.course.location)
modulestore.update_item(self.course, self.user.id) #modulestore.update_item(self.course, self.user.id)
modulestore().update_item(self.course, self.user.id)
self.assertEqual(self.get_persisted_utilities(), []) self.assertEqual(self.get_persisted_utilities(), [])
def test_get_utilities_html(self): def test_get_utilities_html(self):
......
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