From 3fb437e5330e4a8b6563b68191dcbb91595716d6 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Tue, 22 Dec 2015 16:28:35 -0500 Subject: [PATCH] Import test course instead of using XML-backed course. --- lms/djangoapps/django_comment_client/tests/test_models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/django_comment_client/tests/test_models.py b/lms/djangoapps/django_comment_client/tests/test_models.py index 4093252990..17fa747e5e 100644 --- a/lms/djangoapps/django_comment_client/tests/test_models.py +++ b/lms/djangoapps/django_comment_client/tests/test_models.py @@ -5,9 +5,11 @@ from django.test.testcases import TestCase from nose.plugins.attrib import attr from opaque_keys.edx.keys import CourseKey -from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_TOY_MODULESTORE import django_comment_common.models as models -from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase +from xmodule.modulestore.tests.django_utils import ( + TEST_DATA_MIXED_TOY_MODULESTORE, ModuleStoreTestCase +) +from xmodule.modulestore.tests.factories import ToyCourseFactory @attr('shard_1') @@ -23,7 +25,7 @@ class RoleClassTestCase(ModuleStoreTestCase): # For course ID, syntax edx/classname/classdate is important # because xmodel.course_module.id_to_location looks for a string to split - self.course_id = CourseKey.from_string("edX/toy/2012_Fall") + self.course_id = ToyCourseFactory.create().id self.student_role = models.Role.objects.get_or_create(name="Student", course_id=self.course_id)[0] self.student_role.add_permission("delete_thread")