Add tests for FLV support
This commit is contained in:
parent
08deefdcfb
commit
452fa34b36
3 changed files with 10 additions and 0 deletions
BIN
server/szurubooru/tests/assets/flv.flv
Normal file
BIN
server/szurubooru/tests/assets/flv.flv
Normal file
Binary file not shown.
|
@ -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),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -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(
|
||||
|
|
Reference in a new issue