'Test rendered DiscussionXBlock permissions.'

def test_html_with_user(self):

    discussion_xblock = get_module_for_descriptor_internal(user=self.user, descriptor=self.discussion, student_data=mock.Mock(name='student_data'), course_id=self.course.id, track_function=mock.Mock(name='track_function'), xqueue_callback_url_prefix=mock.Mock(name='xqueue_callback_url_prefix'), request_token='request_token')
    fragment = discussion_xblock.render('student_view')
    html = fragment.content
    self.assertIn('data-user-create-comment="false"', html)
    self.assertIn('data-user-create-subcomment="false"', html)
