aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2021-05-13 12:49:31 +0300
committerBonfaceKilz2021-05-26 20:01:28 +0300
commit919a2ee38412270cd5baf1e490b2f733f81cacec (patch)
tree1f8401589130a18fe6ed6f851d8b4ae265c8be69 /wqflask
parent4b3e16df73502c1b4802b6de60f743093351ebc5 (diff)
downloadgenenetwork2-919a2ee38412270cd5baf1e490b2f733f81cacec.tar.gz
tests: test_gen_menu: Remove get_species
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/tests/unit/wqflask/api/test_gen_menu.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/wqflask/tests/unit/wqflask/api/test_gen_menu.py b/wqflask/tests/unit/wqflask/api/test_gen_menu.py
index 743b3bde..7e477da2 100644
--- a/wqflask/tests/unit/wqflask/api/test_gen_menu.py
+++ b/wqflask/tests/unit/wqflask/api/test_gen_menu.py
@@ -3,7 +3,6 @@ import unittest
from unittest import mock
from wqflask.api.gen_menu import gen_dropdown_json
-from wqflask.api.gen_menu import get_species
from wqflask.api.gen_menu import get_groups
from wqflask.api.gen_menu import get_types
from wqflask.api.gen_menu import get_datasets
@@ -67,20 +66,6 @@ class TestGenMenu(unittest.TestCase):
}
}
- def test_get_species(self):
- """Test that assertion is raised when dataset and dataset_name
- are defined"""
- db_mock = mock.MagicMock()
- with db_mock.cursor() as cursor:
- cursor.fetchall.return_value = (
- ('human', 'Human'),
- ('mouse', 'Mouse'))
- self.assertEqual(get_species(db_mock),
- [['human', 'Human'], ['mouse', 'Mouse']])
- cursor.execute.assert_called_once_with(
- "SELECT Name, MenuName FROM Species ORDER BY OrderId"
- )
-
def test_get_groups(self):
"""Test that species groups are grouped correctly"""
db_mock = mock.MagicMock()
@@ -411,7 +396,7 @@ class TestGenMenu(unittest.TestCase):
@mock.patch('wqflask.api.gen_menu.get_datasets')
@mock.patch('wqflask.api.gen_menu.get_types')
@mock.patch('wqflask.api.gen_menu.get_groups')
- @mock.patch('wqflask.api.gen_menu.get_species')
+ @mock.patch('wqflask.api.gen_menu.get_all_species')
def test_gen_dropdown_json(self,
species_mock,
groups_mock,