Coverage for hiperta_stream/tests/utils_test/test_dict_defined_substring_substitution.py: 100%
5 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-07-16 10:16 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-07-16 10:16 +0000
1import pytest
2from hiperta_stream.utils.substring_substitution_utils import (
3 dict_defined_substring_substitution,
4)
7@pytest.mark.parametrize(
8 "d,expected_output",
9 [
10 ({"a": "b", "c": {"d": "@{a}"}, "e": "@{a}"}, {"a": "b", "c": {"d": "b"}, "e": "b"}),
11 ({"a": {"b": "c"}, "d": "@{b}"}, {"a": {"b": "c"}, "d": "c"}),
12 ],
13)
14def test_dict_substring_substitution_util(d, expected_output):
15 assert dict_defined_substring_substitution(d) == expected_output