Commit 91a155aa by muzaffaryousaf

Fixing the failing test: mocking the xmodule_runtime.

TNL-900
parent aaa0eb34
......@@ -520,6 +520,8 @@ class TestCourseStaff(XBlockHandlerTestCase):
def test_cancel_submission_without_reason(self, xblock):
# 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)
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