more tests
This commit is contained in:
parent
1c4ddbd5a0
commit
f307fa6196
3 changed files with 7 additions and 4 deletions
|
|
@ -1,8 +1,6 @@
|
|||
import re
|
||||
|
||||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
from ytdl_sub.utils.exceptions import ValidationException
|
||||
|
|
|
|||
|
|
@ -349,7 +349,9 @@ class TestRegex:
|
|||
)
|
||||
with pytest.raises(
|
||||
ValidationException,
|
||||
match=re.escape("cannot regex capture 'dne' because it is not a source variable"),
|
||||
match=re.escape(
|
||||
"cannot regex capture 'dne' because it is not a source or override variable"
|
||||
),
|
||||
):
|
||||
_ = Subscription.from_dict(
|
||||
config=music_video_config,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ def yt_album_as_chapters_with_regex_preset_dict(yt_album_as_chapters_preset_dict
|
|||
{
|
||||
"regex": {
|
||||
"from": {
|
||||
"chapter_title": {
|
||||
# Ensure regex can handle override variables that come from the
|
||||
# post-metadata stage
|
||||
"override_chapter_title": {
|
||||
"match": r"\d+\. (.+)",
|
||||
"capture_group_names": "captured_track_title",
|
||||
"capture_group_defaults": "{chapter_title}",
|
||||
|
|
@ -54,6 +56,7 @@ def yt_album_as_chapters_with_regex_preset_dict(yt_album_as_chapters_preset_dict
|
|||
}
|
||||
},
|
||||
"overrides": {
|
||||
"override_chapter_title": "{chapter_title}",
|
||||
"track_title": "{captured_track_title}",
|
||||
"track_album": "{captured_track_album}",
|
||||
"track_artist": "{captured_track_artist}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue