From caa1c3ccdf94ee20140b3964aab0ad3058e03699 Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Sun, 7 Feb 2016 15:28:56 +0000 Subject: Create test framework --- tests/common/utils_test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/common/utils_test.py (limited to 'tests/common/utils_test.py') diff --git a/tests/common/utils_test.py b/tests/common/utils_test.py new file mode 100644 index 0000000..9cf1c55 --- /dev/null +++ b/tests/common/utils_test.py @@ -0,0 +1,14 @@ +from common import utils + + +def test_make_where_clause(): + params_with_between = {"column": "BETWEEN"} + + assert utils.make_where_clause(params_with_between) == "WHERE column "\ + "BETWEEN :column1 AND :column2" + + +def test_update_clause_from_dict(): + test_data = {"name": "Flaf"} + + assert utils.update_clause_from_dict(test_data) == "SET name = :name" -- cgit v1.2.3