2020-09-27 01:47:38 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import division, absolute_import, print_function, unicode_literals
|
|
|
|
|
2020-09-03 20:36:34 +00:00
|
|
|
import pytest
|
|
|
|
|
2021-10-10 17:44:32 +00:00
|
|
|
from jellyfin_kodi.helper.utils import values
|
2020-09-03 20:36:34 +00:00
|
|
|
|
|
|
|
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
|