@@ -32,16 +32,16 @@ def thumbnail_generation_with_default_output(tmp_media, inputs, fmt):
32
32
ogv_result .close ()
33
33
34
34
35
- def thumbnail_generation_with_with_extras (tmp_media , inputs , fmt ):
35
+ def thumbnail_generation_with_with_extras (tmp_media , inputs , fmt , base , snapshot_file ):
36
36
generator = Generator (inputs )
37
- generator .base = "/media/thumbnails/"
37
+ generator .base = base
38
38
generator .output = os .path .join (tmp_media , "thumbnails" )
39
39
generator .format = fmt
40
40
generator .compress = 0.5
41
41
generator .interval = 8.2
42
42
generator .generate ()
43
43
44
- snapshot = open (os .path .join (tmp_media , "snapshots" , "specified-base-%s" % fmt ))
44
+ snapshot = open (os .path .join (tmp_media , "snapshots" , snapshot_file + fmt ))
45
45
result = open (os .path .join (tmp_media , "thumbnails" , "video.%s" % fmt ))
46
46
47
47
if fmt == "json" :
@@ -64,7 +64,8 @@ def test_api_vtt_generation_file_inputs_default_output(tmp_media):
64
64
65
65
def test_api_vtt_generation_with_extras (tmp_media ):
66
66
inputs = (os .path .join (tmp_media , "avi" ), os .path .join (tmp_media , "ogv" ))
67
- thumbnail_generation_with_with_extras (tmp_media , inputs , "vtt" )
67
+ thumbnail_generation_with_with_extras (tmp_media , inputs , "vtt" , "" , "specified-empty-base-" )
68
+ thumbnail_generation_with_with_extras (tmp_media , inputs , "vtt" , "/media/thumbnails/" , "specified-base-" )
68
69
69
70
70
71
def test_api_json_generation_directory_inputs_default_output (tmp_media ):
@@ -79,4 +80,5 @@ def test_api_json_generation_file_inputs_default_output(tmp_media):
79
80
80
81
def test_api_json_generation_with_extras (tmp_media ):
81
82
inputs = (os .path .join (tmp_media , "avi" ), os .path .join (tmp_media , "ogv" ))
82
- thumbnail_generation_with_with_extras (tmp_media , inputs , "json" )
83
+ thumbnail_generation_with_with_extras (tmp_media , inputs , "json" , "" , "specified-empty-base-" )
84
+ thumbnail_generation_with_with_extras (tmp_media , inputs , "json" , "/media/thumbnails/" , "specified-base-" )
0 commit comments