Add tests for FLV support

This commit is contained in:
Tachibana Kiyomi 2021-10-02 06:29:10 +09:00
parent 08deefdcfb
commit 452fa34b36
No known key found for this signature in database
GPG key ID: F6CD420DED2157EF
3 changed files with 10 additions and 0 deletions

Binary file not shown.

View file

@ -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),
],
)

View file

@ -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(