aboutsummaryrefslogtreecommitdiff
path: root/wqflask/tests/unit/base
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-12-01 19:16:52 +0300
committerzsloan2022-12-01 15:11:13 -0600
commit96a1652c8359a1215d8ad330ac05d19b1f6d98a3 (patch)
tree0abb57a70a81f41a6593b775b2becaa19bf9908e /wqflask/tests/unit/base
parent613656943b3962f2763ca376c8dbeb8edc6b969a (diff)
downloadgenenetwork2-96a1652c8359a1215d8ad330ac05d19b1f6d98a3.tar.gz
Delete complicated unmaintainable test-cases marked for skipping
* wqflask/tests/unit/base/test_data_set.py (TestDataSetTypes) [test_set_dataset_key_mrna, test_set_dataset_key_pheno, test_set_dataset_geno]: Delete.
Diffstat (limited to 'wqflask/tests/unit/base')
-rw-r--r--wqflask/tests/unit/base/test_data_set.py114
1 files changed, 0 insertions, 114 deletions
diff --git a/wqflask/tests/unit/base/test_data_set.py b/wqflask/tests/unit/base/test_data_set.py
index f5f26614..5e6068f9 100644
--- a/wqflask/tests/unit/base/test_data_set.py
+++ b/wqflask/tests/unit/base/test_data_set.py
@@ -182,117 +182,3 @@ class TestDataSetTypes(unittest.TestCase):
'"HC_M2_0606_P": "ProbeSet", '
'"BXDPublish": "Publish"}'))
- @unittest.skip("Too complicated")
- @mock.patch('base.data_set.g')
- def test_set_dataset_key_mrna(self, db_mock):
- with app.app_context():
- db_mock.db.execute.return_value.fetchone.return_value = [1, 2, 3]
- redis_mock = mock.Mock()
- redis_mock.get.return_value = self.test_dataset
- data_set = DatasetType(redis_mock)
- data_set.set_dataset_key("mrna_expr", "Test")
- self.assertEqual(data_set("Test"), "ProbeSet")
- redis_mock.set.assert_called_once_with(
- "dataset_structure",
- ('{"AD-cases-controls-MyersGeno": "Geno", '
- '"AD-cases-controls-MyersPublish": "Publish", '
- '"AKXDGeno": "Geno", '
- '"AXBXAGeno": "Geno", '
- '"AXBXAPublish": "Publish", '
- '"Aging-Brain-UCIPublish": "Publish", '
- '"All Phenotypes": "Publish", '
- '"B139_K_1206_M": "ProbeSet", '
- '"B139_K_1206_R": "ProbeSet", '
- '"Test": "ProbeSet"}'))
- db_mock.db.execute.assert_called_once_with(
- ("SELECT ProbeSetFreeze.Id FROM ProbeSetFreeze "
- + "WHERE ProbeSetFreeze.Name = \"Test\" ")
- )
-
- @unittest.skip("Too complicated")
- @mock.patch('base.data_set.g')
- def test_set_dataset_key_pheno(self, db_mock):
- with app.app_context():
- db_mock.db.execute.return_value.fetchone.return_value = [1, 2, 3]
- redis_mock = mock.Mock()
- redis_mock.get.return_value = self.test_dataset
- data_set = DatasetType(redis_mock)
- data_set.set_dataset_key("pheno", "Test")
- self.assertEqual(data_set("Test"), "Publish")
- redis_mock.set.assert_called_once_with(
- "dataset_structure",
- ('{"AD-cases-controls-MyersGeno": "Geno", '
- '"AD-cases-controls-MyersPublish": "Publish", '
- '"AKXDGeno": "Geno", '
- '"AXBXAGeno": "Geno", '
- '"AXBXAPublish": "Publish", '
- '"Aging-Brain-UCIPublish": "Publish", '
- '"All Phenotypes": "Publish", '
- '"B139_K_1206_M": "ProbeSet", '
- '"B139_K_1206_R": "ProbeSet", '
- '"Test": "Publish"}'))
- db_mock.db.execute.assert_called_with(
- ("SELECT InfoFiles.GN_AccesionId "
- "FROM InfoFiles, PublishFreeze, InbredSet "
- "WHERE InbredSet.Name = 'Test' AND "
- "PublishFreeze.InbredSetId = InbredSet.Id AND "
- "InfoFiles.InfoPageName = PublishFreeze.Name")
- )
-
- @unittest.skip("Too complicated")
- @mock.patch('base.data_set.g')
- def test_set_dataset_other_pheno(self, db_mock):
- with app.app_context():
- db_mock.db.execute.return_value.fetchone.return_value = [1, 2, 3]
- redis_mock = mock.Mock()
- redis_mock.get.return_value = self.test_dataset
- data_set = DatasetType(redis_mock)
- data_set.set_dataset_key("other_pheno", "Test")
- self.assertEqual(data_set("Test"), "Publish")
-
- redis_mock.set.assert_called_once_with(
- "dataset_structure",
- ('{"AD-cases-controls-MyersGeno": "Geno", '
- '"AD-cases-controls-MyersPublish": "Publish", '
- '"AKXDGeno": "Geno", '
- '"AXBXAGeno": "Geno", '
- '"AXBXAPublish": "Publish", '
- '"Aging-Brain-UCIPublish": "Publish", '
- '"All Phenotypes": "Publish", '
- '"B139_K_1206_M": "ProbeSet", '
- '"B139_K_1206_R": "ProbeSet", '
- '"Test": "Publish"}'))
-
- db_mock.db.execute.assert_called_with(
- ("SELECT PublishFreeze.Name "
- + "FROM PublishFreeze, InbredSet "
- + "WHERE InbredSet.Name = 'Test' AND "
- "PublishFreeze.InbredSetId = InbredSet.Id")
- )
-
- @unittest.skip("Too complicated")
- @mock.patch('base.data_set.g')
- def test_set_dataset_geno(self, db_mock):
- with app.app_context():
- db_mock.db.execute.return_value.fetchone.return_value = [1, 2, 3]
- redis_mock = mock.Mock()
- redis_mock.get.return_value = self.test_dataset
- data_set = DatasetType(redis_mock)
- data_set.set_dataset_key("geno", "Test")
- self.assertEqual(data_set("Test"), "Geno")
- redis_mock.set.assert_called_once_with(
- "dataset_structure",
- ('{"AD-cases-controls-MyersGeno": "Geno", '
- '"AD-cases-controls-MyersPublish": "Publish", '
- '"AKXDGeno": "Geno", '
- '"AXBXAGeno": "Geno", '
- '"AXBXAPublish": "Publish", '
- '"Aging-Brain-UCIPublish": "Publish", '
- '"All Phenotypes": "Publish", '
- '"B139_K_1206_M": "ProbeSet", '
- '"B139_K_1206_R": "ProbeSet", '
- '"Test": "Geno"}'))
-
- db_mock.db.execute.assert_called_with(
- ("SELECT GenoFreeze.Id FROM "
- "GenoFreeze WHERE GenoFreeze.Name = \"Test\" "))