Type fixes for tool_util's unittest utils.

This commit is contained in:
John Chilton
2021-10-14 00:51:10 -04:00
parent 38af311911
commit 7c34dcabfb
2 changed files with 3 additions and 5 deletions
@@ -1,11 +1,11 @@
from galaxy.util.bunch import Bunch
from unittest.mock import Mock
def mock_trans(has_user=True, is_admin=False):
"""A mock ``trans`` object for exposing user info to toolbox filter unit tests."""
trans = Bunch(user_is_admin=is_admin)
trans = Mock(user_is_admin=is_admin)
if has_user:
trans.user = Bunch(preferences={})
trans.user = Mock(preferences={})
else:
trans.user = None
return trans
-2
View File
@@ -66,8 +66,6 @@ check_untyped_defs = False
check_untyped_defs = False
[mypy-galaxy.tools.bundled.data_source.microbial_import_code]
check_untyped_defs = False
[mypy-galaxy.tool_util.unittest_utils]
check_untyped_defs = False
[mypy-galaxy.security]
check_untyped_defs = False
[mypy-galaxy.datatypes.converters.pileup_to_interval_index_converter]