Skip to content

Commit

Permalink
Added ccx library (openedx-unsupported#143)
Browse files Browse the repository at this point in the history
* Refactored tests to use a variety of course IDs using ddt
* Bump versions of opaque keys and ccx libraries
* Added timeout check to see if the elasticsearch index is ready in tests (fixes flaky tests)
  • Loading branch information
dsjen committed Nov 30, 2016
1 parent 75467f6 commit d2fcb7b
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 275 deletions.
20 changes: 6 additions & 14 deletions analytics_data_api/v0/tests/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,18 @@
import StringIO
import csv

from opaque_keys.edx.keys import CourseKey
from rest_framework import status

from analytics_data_api.utils import get_filename_safe_course_id
from analytics_data_api.v0.tests.utils import flatten


DEMO_COURSE_ID = u'course-v1:edX+DemoX+Demo_2014'
SANITIZED_DEMO_COURSE_ID = get_filename_safe_course_id(DEMO_COURSE_ID)
class CourseSamples(object):


class DemoCourseMixin(object):
course_key = None
course_id = None

@classmethod
def setUpClass(cls):
cls.course_id = DEMO_COURSE_ID
cls.course_key = CourseKey.from_string(cls.course_id)
super(DemoCourseMixin, cls).setUpClass()
course_ids = [
'edX/DemoX/Demo_Course',
'course-v1:edX+DemoX+Demo_2014',
'ccx-v1:edx+1.005x-CCX+rerun+ccx@15'
]


class VerifyCourseIdMixin(object):
Expand Down

0 comments on commit d2fcb7b

Please sign in to comment.