Commit 22ccf9c5 by Victor Shnayder

Some test cleanups

parent 69711a91
......@@ -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
......
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment