'This test validates that an image asset is imported and a thumbnail was generated for a .gif'

@requires_pillow_jpeg
def test_asset_import(self):

    content_store = contentstore()
    import_course_from_xml(self.store, self.user.id, TEST_DATA_DIR, ['toy'], static_content_store=content_store, verbose=True, create_if_not_present=True)
    course = self.store.get_course(self.store.make_course_key('edX', 'toy', '2012_Fall'))
    self.assertIsNotNone(course)
    (all_assets, __) = content_store.get_all_content_for_course(course.id)
    self.assertGreater(len(all_assets), 0)
    all_thumbnails = content_store.get_all_content_thumbnails_for_course(course.id)
    self.assertGreater(len(all_thumbnails), 0)
    location = AssetLocation.from_deprecated_string('/c4x/edX/toy/asset/just_a_test.jpg')
    content = content_store.find(location)
    self.assertIsNotNone(content)
    self.assertIsNotNone(content.thumbnail_location)
    thumbnail = content_store.find(content.thumbnail_location)
    self.assertIsNotNone(thumbnail)
