From 92cf784b1afae088122ef8af556d6df6d66de5f9 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 4 Sep 2023 21:49:55 +0300 Subject: Replace "escape_string" with safe-query parameters Signed-off-by: Munyoki Kilyungi --- tests/unit/db/test_species.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/unit/db/test_species.py b/tests/unit/db/test_species.py index 073931e..ee9658f 100644 --- a/tests/unit/db/test_species.py +++ b/tests/unit/db/test_species.py @@ -24,7 +24,8 @@ class TestChromosomes(TestCase): "SELECT Chr_Length.Name, Chr_Length.OrderId, " "Length FROM Chr_Length, Species WHERE " "Chr_Length.SpeciesId = Species.SpeciesId AND " - "Species.Name = 'TestCase' ORDER BY OrderId" + "Species.Name = %(name)s ORDER BY OrderId", + {'name': 'TestCase'} ) @pytest.mark.unit_test @@ -40,7 +41,8 @@ class TestChromosomes(TestCase): "SELECT Chr_Length.Name, Chr_Length.OrderId, " "Length FROM Chr_Length, InbredSet WHERE " "Chr_Length.SpeciesId = InbredSet.SpeciesId AND " - "InbredSet.Name = 'TestCase' ORDER BY OrderId" + "InbredSet.Name = %(name)s ORDER BY OrderId", + {'name': 'TestCase'} ) @pytest.mark.unit_test -- cgit v1.2.3