Tests/scripts/hook_validations/image.py
def is_valid(self):
        """Validate that the image exists and that it is in the permitted size limits."""
        if self._is_valid is False:  # In case we encountered an IndexError in the init - we don't have an image
            return self._is_valid

        is_existing_image = False
        self.oversize_image()
        if '.png' not in self.file_path:
            is_existing_image = self.is_existing_image()
        if is_existing_image:
            self.is_not_default_image()

        return self._is_valid
Validate that the image exists and that it is in the permitted size limits.
Validate that the image exists and that it is in the permitted size limits.
Validate that the image exists and that it is in the permitted size limits .
def is_valid(self):
        if self._is_valid is False:  
            return self._is_valid
        is_existing_image = False
        self.oversize_image()
        if '.png' not in self.file_path:
            is_existing_image = self.is_existing_image()
        if is_existing_image:
            self.is_not_default_image()
        return self._is_valid
def is_valid ( self ) : if self . _is_valid is False : return self . _is_valid is_existing_image = False self . oversize_image ( ) if '.png' not in self . file_path : is_existing_image = self . is_existing_image ( ) if is_existing_image : self . is_not_default_image ( ) return self . _is_valid
Validate that the image exists and that it is in the permitted size limits.
Validate that the image exists and that it is in the permitted size limits .
"""Validate that the image exists and that it is in the permitted size limits.""" # In case we encountered an IndexError in the init - we don't have an image
self