summaryrefslogtreecommitdiff
path: root/tests/common
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common/utils_test.py14
1 files changed, 14 insertions, 0 deletions
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"