From 0a16f5f30fcfe88f91ee3c3ba9ea4464f198d1f1 Mon Sep 17 00:00:00 2001 From: zxBCN Sort_Rufat Date: Thu, 18 Jul 2024 21:22:33 +0200 Subject: [PATCH] wrap query with text --- tests/test_sql_logic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_sql_logic.py b/tests/test_sql_logic.py index be4b1f8..40e5ee5 100644 --- a/tests/test_sql_logic.py +++ b/tests/test_sql_logic.py @@ -3,6 +3,7 @@ import os import pytest import json +from sqlalchemy import text @pytest.fixture(scope='module') def expected_results(): @@ -29,7 +30,7 @@ def run_query_test(db_connection, expected_results, query_name, sql_file): This function is called by the individual test functions to perform the shared logic. """ query_sql = load_sql_query(sql_file) - results = db_connection.execute(query_sql) + results = db_connection.execute(text(query_sql)) results_dict = fetch_results_as_dict(results) # Compare with expected results