test: Product and ProductType icon resizing

This commit is contained in:
thomas girod
2024-09-15 14:58:37 +02:00
parent 79ef151ad3
commit e8b496cfdc
5 changed files with 46 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class ResizedImageFieldFile(ImageFieldFile):
extension = formats[new_format]
else:
raise ValueError(f"Unknown format {new_format}")
return str(Path(self.file.name).with_suffix(f".{extension}"))
return str(Path(self.file.name).with_suffix(extension))
def save(self, name, content, save=True): # noqa FBT002
content.file.seek(0)