Merge pull request #11358 from edx/release

Hotfix for MA-1981 and safe sessions
This commit is contained in:
Nimisha Asthagiri
2016-01-27 15:53:20 -05:00
26 changed files with 1348 additions and 27 deletions

View File

@@ -255,10 +255,12 @@ class TestStaffMasqueradeAsSpecificStudent(StaffMasqueradeTestCase, ProblemSubmi
def login_staff(self):
""" Login as a staff user """
self.logout()
self.login(self.test_user.email, 'test')
def login_student(self):
""" Login as a student """
self.logout()
self.login(self.student_user.email, 'test')
def submit_answer(self, response1, response2):

View File

@@ -379,11 +379,13 @@ class TestViewAuth(ModuleStoreTestCase, LoginEnrollmentTestCase):
self.assertFalse(self.enroll(self.course))
self.assertTrue(self.enroll(self.test_course))
# Then, try as an instructor
self.logout()
self.login(self.instructor_user)
self.assertTrue(self.enroll(self.course))
# unenroll and try again
# Then, try as global staff
self.logout()
self.login(self.global_staff_user)
self.assertTrue(self.enroll(self.course))