Commit 13d0f472 by Clinton Blackburn

Merge pull request #7 from edx/enrollment-modes

Added enrollment mode constants
parents dc0d6f0d d582df72
""" Enrollment education types. """
NONE = 'none' NONE = 'none'
OTHER = 'other' OTHER = 'other'
PRIMARY = 'primary' PRIMARY = 'primary'
......
AUDIT = u'audit'
HONOR = u'honor'
PROFESSIONAL = u'professional'
VERIFIED = u'verified'
ALL = [AUDIT, HONOR, PROFESSIONAL, VERIFIED]
""" Enrollment gender types. """
FEMALE = 'female' FEMALE = 'female'
MALE = 'male' MALE = 'male'
OTHER = 'other' OTHER = 'other'
......
from unittest import TestCase from unittest import TestCase
from analyticsclient.constants import activity_type, demographic, education_level, gender from analyticsclient.constants import activity_type, demographic, education_level, gender, enrollment_modes
class HelperTests(TestCase): class HelperTests(TestCase):
...@@ -7,18 +7,18 @@ class HelperTests(TestCase): ...@@ -7,18 +7,18 @@ class HelperTests(TestCase):
Basic checks for typos. Basic checks for typos.
""" """
def test_activity_type(self): def test_activity_types(self):
self.assertEqual('any', activity_type.ANY) self.assertEqual('any', activity_type.ANY)
self.assertEqual('attempted_problem', activity_type.ATTEMPTED_PROBLEM) self.assertEqual('attempted_problem', activity_type.ATTEMPTED_PROBLEM)
self.assertEqual('played_video', activity_type.PLAYED_VIDEO) self.assertEqual('played_video', activity_type.PLAYED_VIDEO)
self.assertEqual('posted_forum', activity_type.POSTED_FORUM) self.assertEqual('posted_forum', activity_type.POSTED_FORUM)
def test_demographic(self): def test_demographics(self):
self.assertEqual('birth_year', demographic.BIRTH_YEAR) self.assertEqual('birth_year', demographic.BIRTH_YEAR)
self.assertEqual('education', demographic.EDUCATION) self.assertEqual('education', demographic.EDUCATION)
self.assertEqual('gender', demographic.GENDER) self.assertEqual('gender', demographic.GENDER)
def test_education_type(self): def test_education_levels(self):
self.assertEqual('none', education_level.NONE) self.assertEqual('none', education_level.NONE)
self.assertEqual('other', education_level.OTHER) self.assertEqual('other', education_level.OTHER)
self.assertEqual('primary', education_level.PRIMARY) self.assertEqual('primary', education_level.PRIMARY)
...@@ -29,8 +29,14 @@ class HelperTests(TestCase): ...@@ -29,8 +29,14 @@ class HelperTests(TestCase):
self.assertEqual('masters', education_level.MASTERS) self.assertEqual('masters', education_level.MASTERS)
self.assertEqual('doctorate', education_level.DOCTORATE) self.assertEqual('doctorate', education_level.DOCTORATE)
def test_gender_type(self): def test_genders(self):
self.assertEqual('female', gender.FEMALE) self.assertEqual('female', gender.FEMALE)
self.assertEqual('male', gender.MALE) self.assertEqual('male', gender.MALE)
self.assertEqual('other', gender.OTHER) self.assertEqual('other', gender.OTHER)
self.assertEqual('unknown', gender.UNKNOWN) self.assertEqual('unknown', gender.UNKNOWN)
def test_enrollment_modes(self):
self.assertEqual('audit', enrollment_modes.AUDIT)
self.assertEqual('honor', enrollment_modes.HONOR)
self.assertEqual('professional', enrollment_modes.PROFESSIONAL)
self.assertEqual('verified', enrollment_modes.VERIFIED)
...@@ -2,7 +2,7 @@ from distutils.core import setup ...@@ -2,7 +2,7 @@ from distutils.core import setup
setup( setup(
name='edx-analytics-data-api-client', name='edx-analytics-data-api-client',
version='0.2.4', version='0.3.0',
packages=['analyticsclient'], packages=['analyticsclient'],
url='https://github.com/edx/edx-analytics-data-api-client', url='https://github.com/edx/edx-analytics-data-api-client',
description='Client used to access edX analytics data warehouse', description='Client used to access edX analytics data warehouse',
......
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