aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-09-04 21:49:55 +0300
committerBonfaceKilz2023-09-05 14:57:51 +0300
commit92cf784b1afae088122ef8af556d6df6d66de5f9 (patch)
treeb848451414c27a1230700612ecc3bcfc03320a0d /tests
parentea3030f90e23cfbbde4c5a19a18f81af4712535c (diff)
downloadgenenetwork3-92cf784b1afae088122ef8af556d6df6d66de5f9.tar.gz
Replace "escape_string" with safe-query parameters
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/db/test_species.py6
1 files changed, 4 insertions, 2 deletions
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