diff --git a/common/djangoapps/course_groups/cohorts.py b/common/djangoapps/course_groups/cohorts.py index c09e60dd80..1c1208b8f7 100644 --- a/common/djangoapps/course_groups/cohorts.py +++ b/common/djangoapps/course_groups/cohorts.py @@ -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 diff --git a/common/djangoapps/course_groups/tests/tests.py b/common/djangoapps/course_groups/tests/tests.py index 676643567d..1dee9d8042 100644 --- a/common/djangoapps/course_groups/tests/tests.py +++ b/common/djangoapps/course_groups/tests/tests.py @@ -1,7 +1,9 @@ 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): diff --git a/common/lib/xmodule/xmodule/tests/test_import.py b/common/lib/xmodule/xmodule/tests/test_import.py index 8a5eda3882..3c30559086 100644 --- a/common/lib/xmodule/xmodule/tests/test_import.py +++ b/common/lib/xmodule/xmodule/tests/test_import.py @@ -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) + +