Commit 24f0475f by Dennis Jen

Added gender and education level constants.

renamed gender and education files
parent 916437c8
Carlos Andrés Rocha <rocha@edx.org>
Clinton Blackburn <cblackburn@edx.org>
Dennis Jen <djen@edx.org>
Gabe Mulley <gabe@edx.org>
""" Enrollment education types. """
NONE = 'none'
OTHER = 'other'
PRIMARY = 'primary'
JUNIOR_SECONDARY = 'junior_secondary'
SECONDARY = 'secondary'
ASSOCIATES = 'associates'
BACHELORS = 'bachelors'
MASTERS = 'masters'
DOCTORATE = 'doctorate'
""" Enrollment gender types. """
FEMALE = 'female'
MALE = 'male'
OTHER = 'other'
UNKNOWN = 'unknown'
from unittest import TestCase
from analyticsclient.constants import activity_type, demographic
from analyticsclient.constants import activity_type, demographic, education_level, gender
class HelperTests(TestCase):
......@@ -17,3 +17,20 @@ class HelperTests(TestCase):
self.assertEqual('birth_year', demographic.BIRTH_YEAR)
self.assertEqual('education', demographic.EDUCATION)
self.assertEqual('gender', demographic.GENDER)
def test_education_type(self):
self.assertEqual('none', education_level.NONE)
self.assertEqual('other', education_level.OTHER)
self.assertEqual('primary', education_level.PRIMARY)
self.assertEqual('junior_secondary', education_level.JUNIOR_SECONDARY)
self.assertEqual('secondary', education_level.SECONDARY)
self.assertEqual('associates', education_level.ASSOCIATES)
self.assertEqual('bachelors', education_level.BACHELORS)
self.assertEqual('masters', education_level.MASTERS)
self.assertEqual('doctorate', education_level.DOCTORATE)
def test_gender_type(self):
self.assertEqual('female', gender.FEMALE)
self.assertEqual('male', gender.MALE)
self.assertEqual('other', gender.OTHER)
self.assertEqual('unknown', gender.UNKNOWN)
......@@ -2,7 +2,7 @@ from distutils.core import setup
setup(
name='edx-analytics-data-api-client',
version='0.2.3',
version='0.2.4',
packages=['analyticsclient'],
url='https://github.com/edx/edx-analytics-data-api-client',
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