1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00
ansible-podman-collections/tests/unit/plugins/modules/test_common.py
Sergey c952149603
Add unittests for Ansible Podman modules (#504)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-10-31 23:16:45 +02:00

19 lines
587 B
Python

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
from ansible_collections.containers.podman.plugins.module_utils.podman.common import (
lower_keys,
)
@pytest.mark.parametrize('test_input, expected', [
(["AAA", "BBB"], ["AAA", "BBB"]),
("AAQQ", "AAQQ"),
({"AAA": "AaaAa", "11": 22, "AbCdEf": None, "bbb": "aaaAA"},
{"aaa": "AaaAa", "11": 22, "abcdef": None, "bbb": "aaaAA"})
])
def test_lower_keys(test_input, expected):
print(lower_keys.__code__.co_filename)
assert lower_keys(test_input) == expected