update failing tests
This commit is contained in:
parent
85d71f4d10
commit
a0570f7e90
3 changed files with 14 additions and 8 deletions
|
|
@ -1,5 +1,8 @@
|
|||
from typing import Optional
|
||||
|
||||
import pytest
|
||||
from e2e.conftest import mock_run_from_cli
|
||||
from ytdl_sub.utils.file_handler import FileMetadata
|
||||
|
||||
|
||||
class TestView:
|
||||
|
|
@ -22,12 +25,15 @@ class TestView:
|
|||
# Ensure the video and thumbnail are recognized
|
||||
assert len(transaction_log.files_created) == 2
|
||||
|
||||
file_name = f"avUT-zd9v68{'___0' if split_chapters else ''}.webm"
|
||||
video_file = transaction_log.files_created.get(file_name)
|
||||
assert video_file is not None
|
||||
video_metadata: Optional[FileMetadata] = None
|
||||
for file_name, metadata in transaction_log.files_created.items():
|
||||
if file_name.endswith('webm'):
|
||||
video_metadata = metadata
|
||||
break
|
||||
|
||||
assert "Source Variables:" in video_file.metadata
|
||||
assert video_metadata is not None
|
||||
assert "Source Variables:" in video_metadata.metadata
|
||||
if split_chapters:
|
||||
assert " chapter_index: 1" in video_file.metadata
|
||||
assert " chapter_index: 1" in video_metadata.metadata
|
||||
else:
|
||||
assert " chapter_index: 1" not in video_file.metadata
|
||||
assert " chapter_index: 1" not in video_metadata.metadata
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
".ytdl-sub-chapters_from_comments-download-archive.json": "122723ce8d257eebb05178daa26141f6",
|
||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album]-thumb.jpg": "c12e6a6f242680d1096a1a99d74a62c6",
|
||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "f6045c28cc588187167a3f42e6f37f0c",
|
||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "ee8437e52186219ff510214138f00e28",
|
||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].mp4": "8b8a9a731a19bc37feb091559f97ebbc",
|
||||
"JMC/JMC - Move 78 - Automated Improvisation [Full Album].nfo": "7a65b184d24c68fc0ec5380432250f5b"
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
"Project ⧸ Zombie/Season 2011/s2011.e112101 - qbMJh2df1M4.mp4": "60c3221125afbef78990bdcead78a82d",
|
||||
"Project ⧸ Zombie/Season 2011/s2011.e112101 - qbMJh2df1M4.nfo": "3c5e407a428161b75474eea13a82e009",
|
||||
"Project ⧸ Zombie/Season 2012/s2012.e012301 - y5-3ovwQQ_U-thumb.jpg": "54ebe9df801b278fdd17b21afa8373a6",
|
||||
"Project ⧸ Zombie/Season 2012/s2012.e012301 - y5-3ovwQQ_U.mp4": "cdf5d458e148bbadba6dfed5b05e378b",
|
||||
"Project ⧸ Zombie/Season 2012/s2012.e012301 - y5-3ovwQQ_U.mp4": "2141f0f928d55e94fef7f7d3c7a4aca0",
|
||||
"Project ⧸ Zombie/Season 2012/s2012.e012301 - y5-3ovwQQ_U.nfo": "a0d59e102f06b93718ab20e0238b4f95",
|
||||
"Project ⧸ Zombie/Season 2013/s2013.e071901 - c_PZdc0Zi7M-thumb.jpg": "e29d49433175de8a761af35c5307791f",
|
||||
"Project ⧸ Zombie/Season 2013/s2013.e071901 - c_PZdc0Zi7M.mp4": "3fb239f0a646e515bbaaeb6f6d5cdd69",
|
||||
|
|
|
|||
Loading…
Reference in a new issue