Remove the staff debug tests.
Not critical enough to keep as a part of bokchoy.
This commit is contained in:
@@ -102,147 +102,6 @@ class StaffViewToggleTest(CourseWithoutContentGroupsTest):
|
||||
self.assertFalse(course_page.has_tab('Instructor'))
|
||||
|
||||
|
||||
@attr(shard=20)
|
||||
class StaffDebugTest(CourseWithoutContentGroupsTest):
|
||||
"""
|
||||
Tests that verify the staff debug info.
|
||||
"""
|
||||
def test_reset_attempts_empty(self):
|
||||
"""
|
||||
Test that we reset even when there is no student state
|
||||
"""
|
||||
|
||||
staff_debug_page = self._goto_staff_page().open_staff_debug_info()
|
||||
staff_debug_page.reset_attempts()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(
|
||||
u'Successfully reset the attempts for user {}'.format(self.USERNAME), msg,
|
||||
)
|
||||
|
||||
def test_delete_state_empty(self):
|
||||
"""
|
||||
Test that we delete properly even when there isn't state to delete.
|
||||
"""
|
||||
staff_debug_page = self._goto_staff_page().open_staff_debug_info()
|
||||
staff_debug_page.delete_state()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(
|
||||
u'Successfully deleted student state for user {}'.format(self.USERNAME), msg,
|
||||
)
|
||||
|
||||
def test_reset_attempts_state(self):
|
||||
"""
|
||||
Successfully reset the student attempts
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.reset_attempts()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(
|
||||
u'Successfully reset the attempts for user {}'.format(self.USERNAME), msg,
|
||||
)
|
||||
|
||||
def test_rescore_problem(self):
|
||||
"""
|
||||
Rescore the student
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.rescore()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully rescored problem for user {}'.format(self.USERNAME), msg)
|
||||
|
||||
def test_rescore_problem_if_higher(self):
|
||||
"""
|
||||
Rescore the student
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.rescore_if_higher()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully rescored problem to improve score for user {}'.format(self.USERNAME), msg)
|
||||
|
||||
def test_student_state_delete(self):
|
||||
"""
|
||||
Successfully delete the student state with an answer
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.delete_state()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully deleted student state for user {}'.format(self.USERNAME), msg)
|
||||
|
||||
def test_student_by_email(self):
|
||||
"""
|
||||
Successfully reset the student attempts using their email address
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.reset_attempts(self.EMAIL)
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully reset the attempts for user {}'.format(self.EMAIL), msg)
|
||||
|
||||
def test_bad_student(self):
|
||||
"""
|
||||
Test negative response with invalid user
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.answer_problem()
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.delete_state('INVALIDUSER')
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Failed to delete student state for user. User does not exist.', msg)
|
||||
|
||||
def test_reset_attempts_for_problem_loaded_via_ajax(self):
|
||||
"""
|
||||
Successfully reset the student attempts for problem loaded via ajax.
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.load_problem_via_ajax()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.reset_attempts()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully reset the attempts for user {}'.format(self.USERNAME), msg)
|
||||
|
||||
def test_rescore_state_for_problem_loaded_via_ajax(self):
|
||||
"""
|
||||
Rescore the student for problem loaded via ajax.
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.load_problem_via_ajax()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.rescore()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully rescored problem for user {}'.format(self.USERNAME), msg)
|
||||
|
||||
def test_student_state_delete_for_problem_loaded_via_ajax(self):
|
||||
"""
|
||||
Successfully delete the student state for problem loaded via ajax.
|
||||
"""
|
||||
staff_page = self._goto_staff_page()
|
||||
staff_page.load_problem_via_ajax()
|
||||
staff_page.answer_problem()
|
||||
|
||||
staff_debug_page = staff_page.open_staff_debug_info()
|
||||
staff_debug_page.delete_state()
|
||||
msg = staff_debug_page.idash_msg[0]
|
||||
self.assertEqual(u'Successfully deleted student state for user {}'.format(self.USERNAME), msg)
|
||||
|
||||
|
||||
class CourseWithContentGroupsTest(StaffViewTest):
|
||||
"""
|
||||
Verifies that changing the "View this course as" selector works properly for content groups.
|
||||
|
||||
Reference in New Issue
Block a user