

def test_fallback_to_not_found(self):
    bad_image = Image.objects.get(id=1)
    good_image = Image.objects.create(title='Test image', file=get_test_image_file())
    rendition = get_rendition_or_not_found(self, 'width-400')
    self.assertEqual(rendition.width, 400)
    rendition = get_rendition_or_not_found(bad_image, 'width-400')
    self.assertEqual(rendition.file.name, 'not-found')

dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailimages/tests/test_shortcuts.py TestShortcuts.test_fallback_to_not_found/VarMisuse@46/70 `good_image`->`self`