aboutsummaryrefslogtreecommitdiff
path: root/wqflask/tests/base
diff options
context:
space:
mode:
authorBonfaceKilz2020-07-27 14:31:31 +0300
committerBonfaceKilz2020-07-27 14:31:31 +0300
commitd63e7554d6dfce4e80c2570667a0fa371235beb7 (patch)
treef04703c51d88bc4123d7c07f83054fa0af6ac28f /wqflask/tests/base
parent97128f26c5a6ca38d49656f2fb4ab6d4306107d2 (diff)
downloadgenenetwork2-d63e7554d6dfce4e80c2570667a0fa371235beb7.tar.gz
Apply py-lint
* wqflask/tests/base/test_data_set.py: Apply pylint
Diffstat (limited to 'wqflask/tests/base')
-rw-r--r--wqflask/tests/base/test_data_set.py18
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")
+