'Test that context will get proper permissions.'

@ddt.data((False, False, False), (True, False, False), (False, True, False), (False, False, True))
def test_student_perms_are_correct(self, permissions):

    permission_dict = {'create_thread': permissions[0], 'create_comment': permissions[1], 'create_sub_comment': permissions[2]}
    expected_permissions = {'can_create_thread': permission_dict['create_thread'], 'can_create_comment': permission_dict['create_comment'], 'can_create_subcomment': permission_dict['create_sub_comment']}
    self.block.has_permission = (lambda perm: permission_dict[perm])
    with mock.patch.object(loader, 'render_template', mock.Mock):
        self.block.student_view()
    context = self.get_template_context()
    for (permission_name, expected_value) in expected_permissions.items():
        self.assertEqual(expected_value, context[permission_name])
