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
4221ca6f
Commit
4221ca6f
authored
Dec 22, 2015
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ToyCourseFactory instead of the XMLModuleStore-backed toy course.
parent
9cc1d4f9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
openedx/core/djangoapps/course_groups/tests/test_cohorts.py
+3
-2
openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py
+3
-2
No files found.
openedx/core/djangoapps/course_groups/tests/test_cohorts.py
View file @
4221ca6f
...
...
@@ -17,6 +17,7 @@ from student.models import CourseEnrollment
from
student.tests.factories
import
UserFactory
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.django_utils
import
TEST_DATA_MIXED_TOY_MODULESTORE
,
ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
ToyCourseFactory
from
..models
import
CourseUserGroup
,
CourseCohort
,
CourseUserGroupPartitionGroup
from
..
import
cohorts
...
...
@@ -145,7 +146,7 @@ class TestCohorts(ModuleStoreTestCase):
Make sure that course is reloaded every time--clear out the modulestore.
"""
super
(
TestCohorts
,
self
)
.
setUp
()
self
.
toy_course_key
=
SlashSeparatedCourseKey
(
"edX"
,
"toy"
,
"2012_Fall"
)
self
.
toy_course_key
=
ToyCourseFactory
.
create
()
.
id
def
_create_cohort
(
self
,
course_id
,
cohort_name
,
assignment_type
):
"""
...
...
@@ -740,7 +741,7 @@ class TestCohortsAndPartitionGroups(ModuleStoreTestCase):
"""
super
(
TestCohortsAndPartitionGroups
,
self
)
.
setUp
()
self
.
test_course_key
=
SlashSeparatedCourseKey
(
"edX"
,
"toy"
,
"2012_Fall"
)
self
.
test_course_key
=
ToyCourseFactory
.
create
()
.
id
self
.
course
=
modulestore
()
.
get_course
(
self
.
test_course_key
)
self
.
first_cohort
=
CohortFactory
(
course_id
=
self
.
course
.
id
,
name
=
"FirstCohort"
)
...
...
openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py
View file @
4221ca6f
...
...
@@ -16,6 +16,7 @@ from student.tests.factories import UserFactory
from
xmodule.partitions.partitions
import
Group
,
UserPartition
,
UserPartitionError
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
,
TEST_DATA_MIXED_TOY_MODULESTORE
from
xmodule.modulestore.tests.factories
import
ToyCourseFactory
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
openedx.core.djangoapps.user_api.partition_schemes
import
RandomUserPartitionScheme
...
...
@@ -40,7 +41,7 @@ class TestCohortPartitionScheme(ModuleStoreTestCase):
"""
super
(
TestCohortPartitionScheme
,
self
)
.
setUp
()
self
.
course_key
=
SlashSeparatedCourseKey
(
"edX"
,
"toy"
,
"2012_Fall"
)
self
.
course_key
=
ToyCourseFactory
.
create
()
.
id
self
.
course
=
modulestore
()
.
get_course
(
self
.
course_key
)
config_course_cohorts
(
self
.
course
,
is_cohorted
=
True
)
...
...
@@ -286,7 +287,7 @@ class TestGetCohortedUserPartition(ModuleStoreTestCase):
and a student for each test.
"""
super
(
TestGetCohortedUserPartition
,
self
)
.
setUp
()
self
.
course_key
=
SlashSeparatedCourseKey
(
"edX"
,
"toy"
,
"2012_Fall"
)
self
.
course_key
=
ToyCourseFactory
.
create
()
.
id
self
.
course
=
modulestore
()
.
get_course
(
self
.
course_key
)
self
.
student
=
UserFactory
.
create
()
...
...
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