Some test cleanups
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user