diff options
author | BonfaceKilz | 2020-07-27 14:31:31 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-07-27 14:31:31 +0300 |
commit | d63e7554d6dfce4e80c2570667a0fa371235beb7 (patch) | |
tree | f04703c51d88bc4123d7c07f83054fa0af6ac28f /wqflask/tests | |
parent | 97128f26c5a6ca38d49656f2fb4ab6d4306107d2 (diff) | |
download | genenetwork2-d63e7554d6dfce4e80c2570667a0fa371235beb7.tar.gz |
Apply py-lint
* wqflask/tests/base/test_data_set.py: Apply pylint
Diffstat (limited to 'wqflask/tests')
-rw-r--r-- | wqflask/tests/base/test_data_set.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/wqflask/tests/base/test_data_set.py b/wqflask/tests/base/test_data_set.py index 44a54c7e..74799e49 100644 --- a/wqflask/tests/base/test_data_set.py +++ b/wqflask/tests/base/test_data_set.py @@ -1,3 +1,5 @@ +"""Tests for wqflask/base/data_set.py""" + import unittest import mock @@ -5,8 +7,10 @@ from wqflask import app from base.data_set import DatasetType - + class TestDataSetTypes(unittest.TestCase): + """Tests for the DataSetType class""" + def setUp(self): self.app_context = app.app_context() self.app_context.push() @@ -16,10 +20,14 @@ class TestDataSetTypes(unittest.TestCase): @mock.patch('base.data_set.g') def test_data_set_type(self, db_mock): + """Test that DatasetType returns correctly if the Redis Instance is not empty + and the name variable exists in the dictionary + + """ with app.app_context(): db_mock.get = mock.Mock() - r = mock.Mock() - r.get.return_value = """ + redis_mock = mock.Mock() + redis_mock.get.return_value = """ { "AD-cases-controls-MyersGeno": "Geno", "AD-cases-controls-MyersPublish": "Publish", @@ -32,4 +40,6 @@ class TestDataSetTypes(unittest.TestCase): "B139_K_1206_R": "ProbeSet" } """ - self.assertEqual(DatasetType(r)("All Phenotypes"), "Publish") + self.assertEqual(DatasetType(redis_mock) + ("All Phenotypes"), "Publish") + |