Skip to content

Commit

Permalink
Add test case of ${} logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralgond committed Dec 4, 2024
1 parent fdfad1a commit 5e4608b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/test_mapper_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,13 @@ def test_set():
assert len(param_list) == 3
assert param_list[0] == "banana"
assert param_list[1] == 500
assert param_list[2] == "a"
assert param_list[2] == "a"

def test_dollar():
mm = MapperManager()
mm.read_mapper_xml_file("mapper/test.xml")

sql, param_list = mm.select("testStringReplace", {'id': 1, 'date': "20241204"})
assert sql == "SELECT * from fruits_20241204 where id=?"
assert len(param_list) == 1
assert param_list[0] == 1

0 comments on commit 5e4608b

Please sign in to comment.