mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 07:26:18 -05:00
16 lines
554 B
Python
16 lines
554 B
Python
|
|
import pytest
|
||
|
|
|
||
|
|
from modules.videos.video_url_resolver import video_url_resolver
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.mark.parametrize(
|
||
|
|
'domain,entry,expected',
|
||
|
|
[
|
||
|
|
('youtube.com', {'url': 'foo'}, 'https://youtube.com/watch?v=foo'),
|
||
|
|
('youtube.com', {'webpage_url': 'https://youtube.com/watch?v=foo'}, 'https://youtube.com/watch?v=foo'),
|
||
|
|
('youtube.com', {'url': 'https://youtube.com/watch?v=foo'}, 'https://youtube.com/watch?v=foo'),
|
||
|
|
]
|
||
|
|
)
|
||
|
|
def test_video_url_resolver(domain, entry, expected):
|
||
|
|
assert video_url_resolver(domain, entry) == expected
|