From 6e4c02966f06ea86abf8b14db81f9f12c32b35c2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 24 Jan 2023 17:43:43 -0500 Subject: [PATCH] bismark populator improvement... --- lib/tool_shed/test/base/populators.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/tool_shed/test/base/populators.py b/lib/tool_shed/test/base/populators.py index 7e2f93c3316f..9b63e1f7a559 100644 --- a/lib/tool_shed/test/base/populators.py +++ b/lib/tool_shed/test/base/populators.py @@ -92,8 +92,16 @@ def __init__(self, admin_api_interactor: ShedApiInteractor, api_interactor: Shed self._admin_api_interactor = admin_api_interactor self._api_interactor = api_interactor - def setup_bismark_repo(self, repository_id: HasRepositoryId, end: Optional[int] = None): - self.setup_test_data_repo_by_id("bismark", repository_id, assert_ok=False, end=end) + def setup_bismark_repo( + self, + repository_id: Optional[HasRepositoryId] = None, + end: Optional[int] = None, + category_id: Optional[str] = None, + ) -> HasRepositoryId: + if repository_id is None: + category_id = category_id or self.new_category(prefix="testbismark").id + repository_id = self.new_repository(category_id, prefix="testbismark") + return self.setup_test_data_repo_by_id("bismark", repository_id, assert_ok=False, end=end) def setup_test_data_repo_by_id( self,