From f48d60c1f4ddb222629e19fd42c840a961666334 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 7 Sep 2022 11:58:57 +0300 Subject: Use "%s" in sql query * wqflask/base/mrna_assay_tissue_data.py: Delete db_tools. (MrnaAssayTissueData.get_symbol_values_pairs): Re-format query. * wqflask/tests/unit/base/test_mrna_assay_tissue_data.py: (test_get_trait_symbol_and_tissue_values): Add test for above. --- wqflask/tests/unit/base/test_mrna_assay_tissue_data.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'wqflask/tests/unit/base') diff --git a/wqflask/tests/unit/base/test_mrna_assay_tissue_data.py b/wqflask/tests/unit/base/test_mrna_assay_tissue_data.py index ecaa9def..c43fb4b6 100644 --- a/wqflask/tests/unit/base/test_mrna_assay_tissue_data.py +++ b/wqflask/tests/unit/base/test_mrna_assay_tissue_data.py @@ -71,3 +71,11 @@ def test_get_trait_symbol_and_tissue_values(mocker): "k2": ["v2"], "k3": ["v3"], } + cursor.execute.assert_called_with( + "SELECT TissueProbeSetXRef.Symbol, " + "TissueProbeSetData.value FROM " + "TissueProbeSetXRef, TissueProbeSetData " + "WHERE TissueProbeSetData.Id IN (%s) " + "AND TissueProbeSetXRef.DataId = " + "TissueProbeSetData.Id", + ('112',)) -- cgit v1.2.3