Skip to content

Commit

Permalink
tests: update tests after fixing WebP support
Browse files Browse the repository at this point in the history
  • Loading branch information
perrinjerome committed Jan 23, 2024
1 parent c11548b commit c789704
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion cloudooo/handler/ooo/tests/testOooHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ def get(*args, **kw):
('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Word 2007–365'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/html', 'HTML Document (Writer)'),
('text/plain', 'Text - Choose Encoding')]
('text/plain', 'Text - Choose Encoding'),
]
self.assertEqual(get("text/plain;ignored=param"), text_plain_output_list)
self.assertEqual(get("text/plain;charset=UTF-8;ignored=param"), text_plain_output_list)
self.assertEqual(get("text/plain;charset=US-ASCII;ignored=param"), text_plain_output_list)
Expand All @@ -232,6 +234,7 @@ def testGetAllowedConversionFormatList_ApplicationMsword(self):
('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Word 2007–365'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/html', 'HTML Document (Writer)'),
('text/plain', 'Text - Choose Encoding') ])

Expand All @@ -251,6 +254,7 @@ def testGetAllowedConversionFormatList_ApplicationPdf(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand Down Expand Up @@ -280,6 +284,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOasisOpendocumentText(self)
('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Word 2007–365'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/html', 'HTML Document (Writer)'),
('text/plain', 'Text - Choose Encoding'),
])
Expand All @@ -299,6 +304,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOpenxmlformatsOfficedocumen
('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Word 2007–365'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/html', 'HTML Document (Writer)'),
('text/plain', 'Text - Choose Encoding') ])

Expand All @@ -318,6 +324,7 @@ def testGetAllowedConversionFormatList_ImageJpeg(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -338,6 +345,7 @@ def testGetAllowedConversionFormatList_ImagePng(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand Down Expand Up @@ -365,6 +373,7 @@ def testGetAllowedConversionFormatList_TextHtml(self):
('application/vnd.sun.xml.writer', 'OpenOffice.org 1.0 Text Document (Writer/Web)'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/csv', 'Text CSV'),
('text/html', 'HTML Document'),
('text/html', 'HTML Document (Calc)'),
Expand All @@ -389,6 +398,7 @@ def testGetAllowedConversionFormatList_ApplicationPostscript(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -409,6 +419,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOasisOpendocumentGraphics(s
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -429,6 +440,7 @@ def testGetAllowedConversionFormatList_ImageGif(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand Down Expand Up @@ -458,6 +470,7 @@ def testGetAllowedConversionFormatList_ImageSvgXml(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)'),
Expand All @@ -479,6 +492,7 @@ def testGetAllowedConversionFormatList_ImageTiff(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)')])
Expand All @@ -499,6 +513,7 @@ def testGetAllowedConversionFormatList_ImageXCmuRaster(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -519,6 +534,7 @@ def testGetAllowedConversionFormatList_ImageBmp(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -539,6 +555,7 @@ def testGetAllowedConversionFormatList_ImageXPortableBitmap(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -559,6 +576,7 @@ def testGetAllowedConversionFormatList_ImageXPortableGraymap(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -579,6 +597,7 @@ def testGetAllowedConversionFormatList_ImageXPortablePixmap(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -599,6 +618,7 @@ def testGetAllowedConversionFormatList_ImageXXpixmap(self):
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/svg+xml', 'SVGZ - Compressed Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Draw)') ])
Expand All @@ -616,6 +636,7 @@ def testGetAllowedConversionFormatList_ApplicationVndMsExcel(self):
('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'Office Open XML Spreadsheet'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/csv', 'Text CSV'),
('text/html', 'HTML Document (Calc)') ])

Expand All @@ -638,6 +659,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOasisOpendocumentSpreadshee
('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'Office Open XML Spreadsheet'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/csv', 'Text CSV'),
('text/html', 'HTML Document (Calc)') ])

Expand All @@ -654,6 +676,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOpenXmlFormatsOfficedocumen
('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'Office Open XML Spreadsheet'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/csv', 'Text CSV'),
('text/html', 'HTML Document (Calc)') ])

Expand All @@ -672,6 +695,7 @@ def testGetAllowedConversionFormatList_ApplicationVndSunXmlWriter(self):
('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Word 2007–365'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/html', 'HTML Document (Writer)'),
('text/plain', 'Text - Choose Encoding') ])

Expand All @@ -698,6 +722,7 @@ def testGetAllowedConversionFormatList_TextCsv(self):
('application/vnd.sun.xml.writer', 'OpenOffice.org 1.0 Text Document (Writer/Web)'),
('image/jpeg', 'JPEG - Joint Photographic Experts Group'),
('image/png', 'PNG - Portable Network Graphics'),
('image/webp', 'WEBP - WebP Image'),
('text/csv', 'Text CSV'),
('text/html', 'HTML Document'),
('text/html', 'HTML Document (Calc)'),
Expand Down Expand Up @@ -727,6 +752,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOasisOpendocumentPresentati
('image/png', 'PNG - Portable Network Graphics'),
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Impress)') ])
Expand All @@ -752,6 +778,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOpenxmlformatsOfficedocumen
('image/png', 'PNG - Portable Network Graphics'),
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Impress)') ])
Expand All @@ -777,6 +804,7 @@ def testGetAllowedConversionFormatList_ApplicationVndOpenxmlformatsOfficedocumen
('image/png', 'PNG - Portable Network Graphics'),
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Impress)') ])
Expand All @@ -802,6 +830,7 @@ def testGetAllowedConversionFormatList_ApplicationVndMsPowerpoint(self):
('image/png', 'PNG - Portable Network Graphics'),
('image/svg+xml', 'SVG - Scalable Vector Graphics'),
('image/tiff', 'TIFF - Tagged Image File Format'),
('image/webp', 'WEBP - WebP Image'),
('image/wmf', 'WMF - Windows Metafile'),
('image/x-ms-bmp', 'BMP - Windows Bitmap'),
('text/html', 'HTML Document (Impress)') ])

0 comments on commit c789704

Please sign in to comment.