Import test course instead of using XML-backed course.
This commit is contained in:
committed by
Clinton Blackburn
parent
4106528e1a
commit
134fb9c269
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user