diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/twilltestcase.py index 757255a9416b..937b41d262ca 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/twilltestcase.py @@ -15,6 +15,7 @@ Iterator, List, Optional, + Tuple, ) from urllib.parse import ( quote_plus, @@ -694,7 +695,14 @@ def _submit_register_form(self, email: str, password: str, username: str, redire def invalid_tools_labels(self) -> str: return "Invalid Tools" if self.is_v2 else "Invalid tools" - def create(self, cntrller="user", email="test@bx.psu.edu", password="testuser", username="admin-user", redirect=""): + def create( + self, + cntrller: str = "user", + email: str = "test@bx.psu.edu", + password: str = "testuser", + username: str = "admin-user", + redirect: Optional[str] = None, + ) -> Tuple[bool, bool, bool]: # HACK: don't use panels because late_javascripts() messes up the twill browser and it # can't find form fields (and hence user can't be logged in). params = dict(cntrller=cntrller, use_panels=False) @@ -747,7 +755,7 @@ def login( email: str = "test@bx.psu.edu", password: str = "testuser", username: str = "admin-user", - redirect: str = "", + redirect: Optional[str] = None, logout_first: bool = True, ): if self.is_v2: diff --git a/lib/tool_shed/test/functional/test_frontend_login.py b/lib/tool_shed/test/functional/test_frontend_login.py index 1e752c37e934..f359cf97ae41 100644 --- a/lib/tool_shed/test/functional/test_frontend_login.py +++ b/lib/tool_shed/test/functional/test_frontend_login.py @@ -73,4 +73,4 @@ def _create_and_login(self): password=TEST_PASSWORD, username=user, ) - self.login(email, TEST_PASSWORD, username=user, redirect=None) + self.login(email, TEST_PASSWORD, username=user)