def METHOD_NAME(self):
    call_command("create_image_thumbnails")
    for attachment in Attachment.objects.filter(instance=self.instance):
        filename = attachment.media_file.name.replace(".jpg", "")
        for size in ["small", "medium", "large"]:
            thumbnail = "%s-%s.jpg" % (filename, size)
            self.assertTrue(default_storage.exists(thumbnail))
    check_datetime = timezone.now()
    # replace or regenerate thumbnails if they exist
    call_command("create_image_thumbnails", force=True)
    for attachment in Attachment.objects.filter(instance=self.instance):
        filename = attachment.media_file.name.replace(".jpg", "")
        for size in ["small", "medium", "large"]:
            thumbnail = "%s-%s.jpg" % (filename, size)
            self.assertTrue(default_storage.exists(thumbnail))
            self.assertTrue(
                default_storage.get_modified_time(thumbnail) > check_datetime
            )
            default_storage.delete(thumbnail)