diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/twilltestcase.py index 2d9b5e25c86f..d03a5041fee2 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/twilltestcase.py @@ -764,7 +764,7 @@ def login( ) # v2 doesn't log you in on account creation... so force a login here if previously_created or self.is_v2: - # The acount has previously been created, so just login. + # The account has previously been created, so just login. # 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 = {"use_panels": False} @@ -1402,21 +1402,20 @@ def get_repositories_category_api( self.check_for_strings(strings_displayed, strings_not_displayed) def get_or_create_repository( - self, category: Category, owner=None, strings_displayed=None, strings_not_displayed=None, **kwd + self, category: Category, owner: str, name: str, strings_displayed=None, strings_not_displayed=None, **kwd ) -> Optional[Repository]: # If not checking for a specific string, it should be safe to assume that # we expect repository creation to be successful. if strings_displayed is None: - strings_displayed = ["Repository", kwd["name"], "has been created"] + strings_displayed = ["Repository", name, "has been created"] if strings_not_displayed is None: strings_not_displayed = [] - name = kwd["name"] repository = self.populator.get_repository_for(owner, name) - category_id = category.id - assert category_id if repository is None: + category_id = category.id + assert category_id self.visit_url("/repository/create_repository") - self.submit_form(button="create_repository_button", category_id=category_id, **kwd) + self.submit_form(button="create_repository_button", name=name, category_id=category_id, **kwd) self.check_for_strings(strings_displayed, strings_not_displayed) repository = self.populator.get_repository_for(owner, name) return repository