mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Type fixes for tool_util's unittest utils.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user