Commit c6f36cb4 by muzaffaryousaf

Fixing the failing test: mocking the xmodule_runtime.

TNL-900
parent 91a155aa
......@@ -521,7 +521,7 @@ class TestCourseStaff(XBlockHandlerTestCase):
# If we're not course staff, we shouldn't be able to see the
# cancel submission option
xblock.xmodule_runtime = Mock(user_is_staff=False)
self.assertFalse(xblock.is_course_staff)
resp = self.request(xblock, 'cancel_submission', json.dumps({}))
self.assertIn("you do not have permission", resp.decode('utf-8').lower())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment