Skip to content

Commit

Permalink
add placeholder tests #166
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierCladellas committed Dec 13, 2024
1 parent 90f617b commit c74dc05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/configtest/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ def test_flattenDict(self, nested_json, expected,separator,parent_key):
( "My recursive nested placeholder is {{x.{{a.b}}.y}}", { "a.b": "c","x.c.y": "z"},"My recursive nested placeholder is z"),
# Case 2: Deeply Nested Placeholders
("The final result is {{x.{{y.{{a.b}}}}}}",{"a.b": "c","y.c": "x","x.x": "y","x.y": "z"},"The final result is z"),
("The final result is {{x.{{y.{{a.b}}}}}}",{"a.b": "c","y.c": "x","x.x": "y","x.y": "z"},"The final result is y"),
# Case 3: Circular Placeholder (Should remain unchanged)
# Case 3: Deeply Nested Placeholders Not found
("The final result is {{x.{{y.{{a.b}}}}}}",{"a.b": "c","y.c": "x","x.z": "y","x.y": "z"},"The final result is {{x.x}}"),
# Case 4: Circular Placeholder (Should remain unchanged)
# For this case, we want to test what happens if a recursive cycle is formed
("This is a circular placeholder: {{a.{{a}}}}",{"a": "{{a}}"},"This is a circular placeholder: {{a.{{a}}}}")
])
Expand Down

0 comments on commit c74dc05

Please sign in to comment.