'Verify that new content is added and the resources are the same.'

@ddt.data((u'course_mongo', u'data-usage-id="i4x:;_;_TestX;_TS01;_course;_2015"'), (u'course_split', u'data-usage-id="block-v1:TestX+TS02+2015+type@course+block@course"'))
@ddt.unpack
def test_wrap_xblock(self, course_id, data_usage_id):

    fragment = self.create_fragment(u'<h1>Test!</h1>')
    course = getattr(self, course_id)
    test_wrap_output = wrap_xblock(runtime_class=u'TestRuntime', block=course, view=u'baseview', frag=fragment, context=None, usage_id_serializer=(lambda usage_id: quote_slashes(unicode(usage_id))), request_token=uuid.uuid1().get_hex())
    self.assertIsInstance(test_wrap_output, Fragment)
    self.assertIn(u'xblock-baseview', test_wrap_output.content)
    self.assertIn(u'data-runtime-class="TestRuntime"', test_wrap_output.content)
    self.assertIn(data_usage_id, test_wrap_output.content)
    self.assertIn(u'<h1>Test!</h1>', test_wrap_output.content)
    self.assertEqual(test_wrap_output.resources[0].data, u'body    {background-color:red;}')
    self.assertEqual(test_wrap_output.resources[1].data, u'alert("Hi!");')
