MA-635 Block Mobile Content for unfulfilled milestones
Previously, the mobile api did not check for pre-requisite courses or entrance exams. This change checks for these milestones and then returns course content accordingly.
This commit is contained in:
@@ -13,18 +13,21 @@ Test utilities for mobile API tests:
|
||||
# pylint: disable=no-member
|
||||
import ddt
|
||||
from mock import patch
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from courseware.tests.factories import UserFactory
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from courseware.tests.factories import UserFactory
|
||||
from student import auth
|
||||
from student.models import CourseEnrollment
|
||||
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
|
||||
from mobile_api.test_milestones import MobileAPIMilestonesMixin
|
||||
|
||||
|
||||
class MobileAPITestCase(ModuleStoreTestCase, APITestCase):
|
||||
"""
|
||||
@@ -124,7 +127,7 @@ class MobileAuthUserTestMixin(MobileAuthTestMixin):
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
class MobileCourseAccessTestMixin(object):
|
||||
class MobileCourseAccessTestMixin(MobileAPIMilestonesMixin):
|
||||
"""
|
||||
Test Mixin for testing APIs marked with mobile_course_access.
|
||||
(Use MobileEnrolledCourseAccessTestMixin when verify_enrolled is set to True.)
|
||||
|
||||
Reference in New Issue
Block a user