'Tests that the get_context function does basic sanitization'

def test_sanitize_get_context(self):

    mocked_course = Mock(name='mocked_course', lti_passports=['lti_id:test_client:test_secret'])
    modulestore = Mock(name='modulestore')
    modulestore.get_course.return_value = mocked_course
    runtime = Mock(name='runtime', modulestore=modulestore)
    self.xmodule.descriptor.runtime = runtime
    self.xmodule.lti_id = 'lti_id'
    test_cases = ((u'plaintext', u'plaintext'), (u'a    <script>alert(3)</script>', u'a    &lt;script&gt;alert(3)&lt;/script&gt;'), (u'<b>bold    \u5305</b>', u'<b>bold    \u5305</b>'))
    for case in test_cases:
        self.xmodule.score_comment = case[0]
        self.assertEqual(case[1], self.xmodule.get_context()['comment'])
