fix tests
This commit is contained in:
parent
1af1a4882d
commit
2c3e7123f1
2 changed files with 6 additions and 3 deletions
|
|
@ -71,7 +71,7 @@ class TestThrottleProtectionPlugin:
|
|||
),
|
||||
assert_logs(
|
||||
logger=throttle_protection_logger,
|
||||
expected_message="Sleeping between subscriptions for %0.2f seconds",
|
||||
expected_message="Sleeping between subscriptions for 0.02 seconds",
|
||||
log_level="info",
|
||||
expected_occurrences=1,
|
||||
),
|
||||
|
|
@ -139,7 +139,7 @@ class TestThrottleProtectionPlugin:
|
|||
),
|
||||
assert_logs(
|
||||
logger=throttle_protection_logger,
|
||||
expected_message="Reached subscription max downloads of %d",
|
||||
expected_message="Reached subscription max downloads of 0 for throttle protection",
|
||||
log_level="info",
|
||||
expected_occurrences=1,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ from ytdl_sub.downloaders.ytdlp import YTDLP
|
|||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
from ytdl_sub.utils.exceptions import ValidationException
|
||||
from ytdl_sub.utils.ffmpeg import FFMPEG
|
||||
from ytdl_sub.utils.file_path import FilePathTruncater
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -31,7 +32,9 @@ class TestYtdlOptions:
|
|||
):
|
||||
expected_ytdl_options = {
|
||||
"ignoreerrors": True,
|
||||
"outtmpl": f"{working_directory}/test_ytdl_options/%(id)S.%(ext)s",
|
||||
"outtmpl": FilePathTruncater.to_native_filepath(
|
||||
f"{working_directory}/test_ytdl_options/%(id)S.%(ext)s"
|
||||
),
|
||||
"writethumbnail": False,
|
||||
"ffmpeg_location": FFMPEG.ffmpeg_path(),
|
||||
"match_filter": yt_dlp.utils.match_filter_func(
|
||||
|
|
|
|||
Loading…
Reference in a new issue