Enable Milestones in LMS Tests

This commit is contained in:
Nimisha Asthagiri
2016-07-24 21:35:15 -04:00
committed by Sanford Student
parent 99eb795a89
commit a1a5a0fcb9
8 changed files with 22 additions and 10 deletions

View File

@@ -40,6 +40,7 @@ from courseware.tests.factories import (
from courseware.tests.helpers import LoginEnrollmentTestCase
from django_comment_common.models import FORUM_ROLE_COMMUNITY_TA
from django_comment_common.utils import seed_permissions_roles
from milestones.tests.utils import MilestonesTestCaseMixin
from shoppingcart.models import (
RegistrationCodeRedemption, Order, CouponRedemption,
PaidCourseRegistration, Coupon, Invoice, CourseRegistrationCode, CourseRegistrationCodeInvoiceItem,
@@ -3277,7 +3278,11 @@ class TestInstructorAPIRegradeTask(SharedModuleStoreTestCase, LoginEnrollmentTes
@attr('shard_1')
@patch.dict(settings.FEATURES, {'ENTRANCE_EXAMS': True})
@ddt.ddt
class TestEntranceExamInstructorAPIRegradeTask(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
class TestEntranceExamInstructorAPIRegradeTask(
SharedModuleStoreTestCase,
LoginEnrollmentTestCase,
MilestonesTestCaseMixin
):
"""
Test endpoints whereby instructors can rescore student grades,
reset student attempts and delete state for entrance exam.
@@ -3368,7 +3373,7 @@ class TestEntranceExamInstructorAPIRegradeTask(SharedModuleStoreTestCase, LoginE
self.assertEqual(grades[0], (50.0, 1))
self.assertEqual(grades[1], (100.0, 1))
def test_reset_entrance_exam_student_attempts_deletall(self):
def test_reset_entrance_exam_student_attempts_delete_all(self):
""" Make sure no one can delete all students state on entrance exam. """
url = reverse('reset_student_attempts_for_entrance_exam',
kwargs={'course_id': unicode(self.course.id)})
@@ -3415,7 +3420,7 @@ class TestEntranceExamInstructorAPIRegradeTask(SharedModuleStoreTestCase, LoginE
})
self.assertEqual(response.status_code, 400)
def test_entrance_exam_sttudent_delete_state(self):
def test_entrance_exam_student_delete_state(self):
""" Test delete single student entrance exam state. """
url = reverse('reset_student_attempts_for_entrance_exam',
kwargs={'course_id': unicode(self.course.id)})