From 919a2ee38412270cd5baf1e490b2f733f81cacec Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 13 May 2021 12:49:31 +0300 Subject: tests: test_gen_menu: Remove get_species --- wqflask/tests/unit/wqflask/api/test_gen_menu.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'wqflask') 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, -- cgit v1.2.3