Commit 7c34dcab authored by John Chilton's avatar John Chilton
Browse files

Type fixes for tool_util's unittest utils.

parent 38af3119
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
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
+0 −2
Original line number Diff line number Diff line
@@ -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]