mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-14 05:15:08 +00:00
Handle empty files in profile video XMLs
This commit is contained in:
parent
52bb733254
commit
ee7672a0a1
2 changed files with 61 additions and 16 deletions
18
tests/test_helper_utils.py
Normal file
18
tests/test_helper_utils.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, 'jellyfin_kodi')
|
||||
|
||||
from helper.utils import values # noqa: E402
|
||||
|
||||
item1 = {'foo': 123, 'bar': 456, 'baz': 789}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("item,keys,expected", [
|
||||
(item1, ['{foo}', '{baz}'], [123, 789]),
|
||||
(item1, ['{foo}', 'bar'], [123, 'bar']),
|
||||
(item1, ['{foo}', 'bar', 321], [123, 'bar', 321]),
|
||||
])
|
||||
def test_values(item, keys, expected):
|
||||
assert list(values(item, keys)) == expected
|
Loading…
Add table
Add a link
Reference in a new issue