@@ -224,17 +224,31 @@ def test_guess_known_extensions(self):
224224 def test_preferred_extension (self ):
225225 def check_extensions ():
226226 for mime_type , ext in (
227+ ("application/epub+zip" , ".epub" ),
227228 ("application/octet-stream" , ".bin" ),
229+ ("application/ogg" , ".ogx" ),
228230 ("application/postscript" , ".ps" ),
229231 ("application/vnd.apple.mpegurl" , ".m3u" ),
230232 ("application/vnd.ms-excel" , ".xls" ),
231233 ("application/vnd.ms-fontobject" , ".eot" ),
232234 ("application/vnd.ms-powerpoint" , ".ppt" ),
235+ ("application/vnd.oasis.opendocument.graphics" , ".odg" ),
236+ ("application/vnd.oasis.opendocument.presentation" , ".odp" ),
237+ ("application/vnd.oasis.opendocument.spreadsheet" , ".ods" ),
238+ ("application/vnd.oasis.opendocument.text" , ".odt" ),
239+ ("application/vnd.openxmlformats-officedocument.presentationml.presentation" , ".pptx" ),
240+ ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" , ".xlsx" ),
241+ ("application/vnd.openxmlformats-officedocument.wordprocessingml.document" , ".docx" ),
233242 ("application/x-texinfo" , ".texi" ),
234243 ("application/x-troff" , ".roff" ),
235244 ("application/xml" , ".xsl" ),
245+ ("audio/flac" , ".flac" ),
236246 ("audio/matroska" , ".mka" ),
247+ ("audio/mp4" , ".m4a" ),
237248 ("audio/mpeg" , ".mp3" ),
249+ ("audio/ogg" , ".ogg" ),
250+ ("audio/vnd.wave" , ".wav" ),
251+ ("audio/webm" , ".weba" ),
238252 ("font/otf" , ".otf" ),
239253 ("font/ttf" , ".ttf" ),
240254 ("font/woff" , ".woff" ),
@@ -244,13 +258,13 @@ def check_extensions():
244258 ("image/fits" , ".fits" ),
245259 ("image/g3fax" , ".g3" ),
246260 ("image/jp2" , ".jp2" ),
261+ ("image/jpeg" , ".jpg" ),
247262 ("image/jpm" , ".jpm" ),
248263 ("image/t38" , ".t38" ),
249- ("image/webp" , ".webp" ),
250- ("image/wmf" , ".wmf" ),
251- ("image/jpeg" , ".jpg" ),
252264 ("image/tiff" , ".tiff" ),
253265 ("image/tiff-fx" , ".tfx" ),
266+ ("image/webp" , ".webp" ),
267+ ("image/wmf" , ".wmf" ),
254268 ("message/rfc822" , ".eml" ),
255269 ("text/html" , ".html" ),
256270 ("text/plain" , ".txt" ),
@@ -259,7 +273,9 @@ def check_extensions():
259273 ("video/matroska" , ".mkv" ),
260274 ("video/matroska-3d" , ".mk3d" ),
261275 ("video/mpeg" , ".mpeg" ),
276+ ("video/ogg" , ".ogv" ),
262277 ("video/quicktime" , ".mov" ),
278+ ("video/vnd.avi" , ".avi" ),
263279 ):
264280 with self .subTest (mime_type = mime_type , ext = ext ):
265281 self .assertEqual (mimetypes .guess_extension (mime_type ), ext )
0 commit comments