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
22ccf9c5
Commit
22ccf9c5
authored
Jan 24, 2013
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some test cleanups
parent
69711a91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
common/djangoapps/course_groups/cohorts.py
+1
-0
common/djangoapps/course_groups/tests/tests.py
+3
-1
common/lib/xmodule/xmodule/tests/test_import.py
+5
-3
No files found.
common/djangoapps/course_groups/cohorts.py
View file @
22ccf9c5
...
...
@@ -4,6 +4,7 @@ forums, and to the cohort admin views.
"""
from
django.contrib.auth.models
import
User
from
django.http
import
Http404
import
logging
from
courseware
import
courses
...
...
common/djangoapps/course_groups/tests/tests.py
View file @
22ccf9c5
import
django.test
from
django.contrib.auth.models
import
User
from
course_groups.models
import
CourseUserGroup
,
get_cohort
,
get_course_cohorts
from
course_groups.models
import
CourseUserGroup
from
course_groups.cohorts
import
get_cohort
,
get_course_cohorts
class
TestCohorts
(
django
.
test
.
TestCase
):
...
...
common/lib/xmodule/xmodule/tests/test_import.py
View file @
22ccf9c5
...
...
@@ -368,13 +368,15 @@ class ImportTestCase(unittest.TestCase):
self
.
assertFalse
(
course
.
is_cohorted
)
# empty config -> False
course
.
metadata
[
'cohort
-
config'
]
=
{}
course
.
metadata
[
'cohort
_
config'
]
=
{}
self
.
assertFalse
(
course
.
is_cohorted
)
# false config -> False
course
.
metadata
[
'cohort
-
config'
]
=
{
'cohorted'
:
False
}
course
.
metadata
[
'cohort
_
config'
]
=
{
'cohorted'
:
False
}
self
.
assertFalse
(
course
.
is_cohorted
)
# and finally...
course
.
metadata
[
'cohort
-
config'
]
=
{
'cohorted'
:
True
}
course
.
metadata
[
'cohort
_
config'
]
=
{
'cohorted'
:
True
}
self
.
assertTrue
(
course
.
is_cohorted
)
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