Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit d2fcb7b

Browse files
authored
Added ccx library (#143)
* 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)
1 parent 75467f6 commit d2fcb7b

6 files changed

Lines changed: 290 additions & 275 deletions

File tree

analytics_data_api/v0/tests/views/__init__.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,18 @@
22
import StringIO
33
import csv
44

5-
from opaque_keys.edx.keys import CourseKey
65
from rest_framework import status
76

8-
from analytics_data_api.utils import get_filename_safe_course_id
97
from analytics_data_api.v0.tests.utils import flatten
108

119

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

15-
16-
class DemoCourseMixin(object):
17-
course_key = None
18-
course_id = None
19-
20-
@classmethod
21-
def setUpClass(cls):
22-
cls.course_id = DEMO_COURSE_ID
23-
cls.course_key = CourseKey.from_string(cls.course_id)
24-
super(DemoCourseMixin, cls).setUpClass()
12+
course_ids = [
13+
'edX/DemoX/Demo_Course',
14+
'course-v1:edX+DemoX+Demo_2014',
15+
'ccx-v1:edx+1.005x-CCX+rerun+ccx@15'
16+
]
2517

2618

2719
class VerifyCourseIdMixin(object):

0 commit comments

Comments
 (0)