From ffa5fb1f0ba6219fb5cc03310ba0abd3f20148c8 Mon Sep 17 00:00:00 2001 From: Sunny Sun <38218185+sunnyosun@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:23:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/core/test_can_validate.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/core/test_can_validate.py b/tests/core/test_can_validate.py index 0372ddc8e..88ecd4988 100644 --- a/tests/core/test_can_validate.py +++ b/tests/core/test_can_validate.py @@ -121,6 +121,8 @@ def test_validate_int(): def test_synonym_mapping(): # only name field can be standardized + bt.Gene.from_source(symbol="TNFRSF4", organism="human").save() + bt_result = bt.Gene.public().inspect( ["ABC1", "TNFRSF4"], field="symbol", organism="human" ) @@ -131,10 +133,14 @@ def test_synonym_mapping(): ) assert bt_result.synonyms_mapper == {} - result = bt.Gene.inspect(["SRM", "TNFRSF4"], field=bt.Gene.symbol, organism="human") - assert result.synonyms_mapper == {"SRM": "SRMS"} + result = bt.Gene.inspect( + ["CD134", "TNFRSF4"], field=bt.Gene.symbol, organism="human" + ) + assert result.synonyms_mapper == {"CD134": "TNFRSF4"} result = bt.Gene.inspect( - ["SRM", "TNFRSF4"], field=bt.Gene.ensembl_gene_id, organism="human" + ["CD134", "TNFRSF4"], field=bt.Gene.ensembl_gene_id, organism="human" ) assert result.synonyms_mapper == {} + + bt.Gene.filter().delete()