Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3fb437e5
Commit
3fb437e5
authored
Dec 22, 2015
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import test course instead of using XML-backed course.
parent
74eb70aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lms/djangoapps/django_comment_client/tests/test_models.py
+5
-3
No files found.
lms/djangoapps/django_comment_client/tests/test_models.py
View file @
3fb437e5
...
@@ -5,9 +5,11 @@ from django.test.testcases import TestCase
...
@@ -5,9 +5,11 @@ from django.test.testcases import TestCase
from
nose.plugins.attrib
import
attr
from
nose.plugins.attrib
import
attr
from
opaque_keys.edx.keys
import
CourseKey
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
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'
)
@attr
(
'shard_1'
)
...
@@ -23,7 +25,7 @@ class RoleClassTestCase(ModuleStoreTestCase):
...
@@ -23,7 +25,7 @@ class RoleClassTestCase(ModuleStoreTestCase):
# For course ID, syntax edx/classname/classdate is important
# For course ID, syntax edx/classname/classdate is important
# because xmodel.course_module.id_to_location looks for a string to split
# 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"
,
self
.
student_role
=
models
.
Role
.
objects
.
get_or_create
(
name
=
"Student"
,
course_id
=
self
.
course_id
)[
0
]
course_id
=
self
.
course_id
)[
0
]
self
.
student_role
.
add_permission
(
"delete_thread"
)
self
.
student_role
.
add_permission
(
"delete_thread"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment