diff --git a/server/szurubooru/tests/assets/flv.flv b/server/szurubooru/tests/assets/flv.flv new file mode 100644 index 00000000..799d137e Binary files /dev/null and b/server/szurubooru/tests/assets/flv.flv differ diff --git a/server/szurubooru/tests/func/test_mime.py b/server/szurubooru/tests/func/test_mime.py index b33746b4..0c8f23d4 100644 --- a/server/szurubooru/tests/func/test_mime.py +++ b/server/szurubooru/tests/func/test_mime.py @@ -19,6 +19,7 @@ from szurubooru.func import mime ("heif.heif", "image/heif"), ("heic.heic", "image/heic"), ("heic-heix.heic", "image/heic"), + ("flv.flv", "video/x-flv"), ("text.txt", "application/octet-stream"), ], ) @@ -72,6 +73,8 @@ def test_is_flash(input_mime_type, expected_state): ("VIDEO/MP4", True), ("video/anything_else", False), ("application/ogg", True), + ("video/x-flv", True), + ("VIDEO/X-FLV", True), ("not a video", False), ], ) diff --git a/server/szurubooru/tests/func/test_posts.py b/server/szurubooru/tests/func/test_posts.py index fa1b3bb6..4bd735a5 100644 --- a/server/szurubooru/tests/func/test_posts.py +++ b/server/szurubooru/tests/func/test_posts.py @@ -462,6 +462,13 @@ def test_update_post_source_with_too_long_string(): model.Post.TYPE_FLASH, "1_244c8840887984c4.swf", ), + ( + False, + "flv.flv", + "video/x-flv", + model.Post.TYPE_VIDEO, + "1_244c8840887984c4.flv", + ), ], ) def test_update_post_content_for_new_post(