'Check that related xblock asides populate information in the \'problem_check\' event in case
the \'get_event_context\' method is exist'

@XBlockAside.register_temp_plugin(AsideTestType, 'test_aside')
@patch('xmodule.modulestore.mongo.base.CachingDescriptorSystem.applicable_aside_types', (lambda self, block: ['test_aside']))
@patch('lms.djangoapps.lms_xblock.runtime.LmsModuleSystem.applicable_aside_types', (lambda self, block: ['test_aside']))
def test_context_contains_aside_info(self, mock_tracker):

    problem_display_name = u'Test    Problem'
    def get_event_context(self, event_type, event):
        '\n                                                This    method    return    data    that    should    be    associated    with    the    "check_problem"    event\n                                                '
        return {'content': 'test1', 'data_field': 'test2'}
    AsideTestType.get_event_context = get_event_context
    context_info = self.handle_callback_and_get_context_info(mock_tracker, problem_display_name)
    self.assertIn('asides', context_info)
    self.assertIn('test_aside', context_info['asides'])
    self.assertIn('content', context_info['asides']['test_aside'])
    self.assertEquals(context_info['asides']['test_aside']['content'], 'test1')
    self.assertIn('data_field', context_info['asides']['test_aside'])
    self.assertEquals(context_info['asides']['test_aside']['data_field'], 'test2')
