Commit 134fb9c2 by John Eskew Committed by Clinton Blackburn

Import test course instead of using XML-backed course.

parent 4106528e
......@@ -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")
......
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