From 22ccf9c5008f963f9dda3a6dcf3621d2033a8d3d Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Thu, 24 Jan 2013 17:33:25 -0500 Subject: [PATCH] Some test cleanups --- common/djangoapps/course_groups/cohorts.py | 1 + common/djangoapps/course_groups/tests/tests.py | 4 +++- common/lib/xmodule/xmodule/tests/test_import.py | 8 +++++--- 3 files changed, 9 insertions(+), 4 deletions(-) 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) + +