fix some tests
This commit is contained in:
parent
5224b321c8
commit
c0e79811fa
2 changed files with 25 additions and 22 deletions
|
|
@ -52,12 +52,14 @@ class UrlDownloaderBasePluginExtension(SourcePluginExtension[MultiUrlValidator])
|
||||||
|
|
||||||
if 0 <= input_url_idx < len(self.plugin_options.urls.list):
|
if 0 <= input_url_idx < len(self.plugin_options.urls.list):
|
||||||
validator = self.plugin_options.urls.list[input_url_idx]
|
validator = self.plugin_options.urls.list[input_url_idx]
|
||||||
if self.overrides.apply_formatter(validator.url) == entry_input_url:
|
for url_validator in validator.url:
|
||||||
|
if self.overrides.apply_formatter(url_validator) == entry_input_url:
|
||||||
return validator
|
return validator
|
||||||
|
|
||||||
# Match the first validator based on the URL, if one exists
|
# Match the first validator based on the URL, if one exists
|
||||||
for validator in self.plugin_options.urls.list:
|
for validator in self.plugin_options.urls.list:
|
||||||
if self.overrides.apply_formatter(validator.url) == entry_input_url:
|
for url_validator in validator.url:
|
||||||
|
if self.overrides.apply_formatter(url_validator) == entry_input_url:
|
||||||
return validator
|
return validator
|
||||||
|
|
||||||
# Return the first validator if none exist
|
# Return the first validator if none exist
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,9 @@ class TestTvShowCollectionPreset:
|
||||||
season_num = 0
|
season_num = 0
|
||||||
|
|
||||||
for i in range(num_urls_per_season):
|
for i in range(num_urls_per_season):
|
||||||
|
for url_validator in url_list[itr].url:
|
||||||
url = sub.overrides.apply_formatter(
|
url = sub.overrides.apply_formatter(
|
||||||
url_list[itr].url,
|
url_validator,
|
||||||
function_overrides={
|
function_overrides={
|
||||||
# mock so bilateral url gets enabled
|
# mock so bilateral url gets enabled
|
||||||
"subscription_has_download_archive": "True"
|
"subscription_has_download_archive": "True"
|
||||||
|
|
@ -74,4 +75,4 @@ class TestTvShowCollectionPreset:
|
||||||
== f"The Season {season_num}"
|
== f"The Season {season_num}"
|
||||||
)
|
)
|
||||||
|
|
||||||
itr += 1
|
itr += len(url_list[itr].url)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue