'Test behavior when entries have been created but we are disabled.
This might happen because a strange bug was introduced -- e.g. we
corrupt the images somehow when making thumbnails. Expectations:
1. We ignore whatever was created for the thumbnails, and image_urls
returns the same as if no thumbnails had ever been generated. So
basically, we return the raw source image for every resolution.
2. We keep the CourseOverviewImageSet data around for debugging
purposes.'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_disabled_with_prior_data(self, modulestore_type):

    course_image = 'my_course.jpg'
    broken_small_url = 'I    am    small!'
    broken_large_url = 'I    am    big!'
    with self.store.default_store(modulestore_type):
        course = CourseFactory.create(default_store=modulestore_type, course_image=course_image)
        course_overview_before = CourseOverview.get_from_id(course.id)
    self.assertTrue(hasattr(course_overview_before, 'image_set'))
    course_overview_before.image_set.small_url = broken_small_url
    course_overview_before.image_set.large_url = broken_large_url
    course_overview_before.image_set.save()
    self.set_config(False)
    course_overview_after = CourseOverview.get_from_id(course.id)
    self.assertTrue(hasattr(course_overview_after, 'image_set'))
    image_set = course_overview_after.image_set
    self.assertEqual(image_set.small_url, broken_small_url)
    self.assertEqual(image_set.large_url, broken_large_url)
    expected_url = course_image_url(course)
    self.assertEqual(course_overview_after.image_urls, {'raw': expected_url, 'small': expected_url, 'large': expected_url})
