mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #21953 from jmchilton/toolshed_cleanup_iteration
Shed Cleanup - Eliminate Twill
This commit is contained in:
@@ -210,7 +210,6 @@ total-perspective-vortex==3.1.3
|
||||
trio==0.33.0
|
||||
trio-websocket==0.12.2
|
||||
tuspy==1.1.0
|
||||
twill==3.3.1
|
||||
twine==6.2.0
|
||||
types-cachetools==6.2.0.20251022
|
||||
types-requests==2.32.4.20260107
|
||||
|
||||
@@ -162,7 +162,6 @@ total-perspective-vortex==3.1.3
|
||||
trio==0.33.0
|
||||
trio-websocket==0.12.2
|
||||
tuspy==1.1.0
|
||||
twill==3.3.1
|
||||
types-cachetools==6.2.0.20251022
|
||||
types-requests==2.32.4.20260107
|
||||
typing-extensions==4.15.0
|
||||
|
||||
@@ -1779,8 +1779,7 @@ def _verify_outputs(testdef, history, jobs, data_list, data_collection_list, gal
|
||||
output_data = data_list[name]
|
||||
except (TypeError, KeyError):
|
||||
# Legacy - fall back on ordered data list access if data_list is
|
||||
# just a list (case with twill variant or if output changes its
|
||||
# name).
|
||||
# just a list (e.g. if output changes its name).
|
||||
try:
|
||||
if hasattr(data_list, "values"):
|
||||
output_data = list(data_list.values())[output_index]
|
||||
|
||||
@@ -1392,7 +1392,6 @@ class ColumnListParameter(SelectToolParameter):
|
||||
those columns that contain numerical values in the associated DataToolParameter.
|
||||
|
||||
# TODO: we need better testing here, but not sure how to associate a DatatoolParameter with a ColumnListParameter
|
||||
# from a twill perspective...
|
||||
|
||||
>>> # Mock up a history (not connected to database)
|
||||
>>> from galaxy.model import History, HistoryDatasetAssociation
|
||||
|
||||
@@ -52,9 +52,9 @@ Modern Playwright/API tests:
|
||||
### API Tests (ShedApiTestCase)
|
||||
|
||||
```python
|
||||
from tool_shed.test.base.twilltestcase import ShedTwillTestCase
|
||||
from tool_shed.test.base.testcase import ShedTestCase
|
||||
|
||||
class TestMyFeature(ShedTwillTestCase):
|
||||
class TestMyFeature(ShedTestCase):
|
||||
def test_create_repo(self):
|
||||
category = self.create_category(name="Test")
|
||||
repo = self.get_or_create_repository(
|
||||
|
||||
@@ -6,26 +6,25 @@ Base classes and utilities for Tool Shed functional tests.
|
||||
|
||||
```
|
||||
base/
|
||||
├── driver.py # ToolShedTestDriver - embedded server setup
|
||||
├── twilltestcase.py # ShedTwillTestCase - main test base class
|
||||
├── driver.py # ToolShedTestDriver - embedded server setup
|
||||
├── testcase.py # ShedTestCase - main test base class
|
||||
├── playwrighttestcase.py # PlaywrightTestCase - browser test base
|
||||
├── playwrightbrowser.py # PlaywrightShedBrowser - browser abstraction
|
||||
├── twillbrowser.py # TwillShedBrowser - legacy browser
|
||||
├── browser.py # ShedBrowser protocol
|
||||
├── populators.py # ToolShedPopulator - API fixture creation
|
||||
├── api.py # ShedApiTestCase - API test base
|
||||
├── api_util.py # API interaction utilities
|
||||
└── test_db_util.py # Direct database access
|
||||
├── browser.py # ShedBrowser protocol
|
||||
├── populators.py # ToolShedPopulator - API fixture creation
|
||||
├── api.py # ShedApiTestCase - API test base
|
||||
├── api_util.py # API interaction utilities
|
||||
└── test_db_util.py # Direct database access
|
||||
```
|
||||
|
||||
## Base Classes
|
||||
|
||||
### ShedTwillTestCase
|
||||
### ShedTestCase
|
||||
|
||||
Main test base class with repository/category management:
|
||||
|
||||
```python
|
||||
class TestFeature(ShedTwillTestCase):
|
||||
class TestFeature(ShedTestCase):
|
||||
def test_repo_creation(self):
|
||||
category = self.create_category(name="Tools")
|
||||
repo = self.get_or_create_repository(
|
||||
@@ -37,6 +36,7 @@ class TestFeature(ShedTwillTestCase):
|
||||
```
|
||||
|
||||
Key methods:
|
||||
|
||||
- `create_category()` - Create test category
|
||||
- `get_or_create_repository()` - Create repository with category
|
||||
- `upload_file()` / `commit_tar_to_repository()` - Upload content
|
||||
@@ -57,6 +57,7 @@ class TestUI(PlaywrightTestCase):
|
||||
```
|
||||
|
||||
Properties:
|
||||
|
||||
- `_page` - Playwright Page instance
|
||||
- `_playwright_browser` - PlaywrightShedBrowser wrapper
|
||||
|
||||
@@ -129,14 +130,11 @@ browser.expect_logged_in()
|
||||
```
|
||||
|
||||
Locators available via `Locators` class:
|
||||
|
||||
- `Locators.toolbar_login`
|
||||
- `Locators.login_submit_button`
|
||||
- `Locators.register_link`
|
||||
|
||||
### TwillShedBrowser
|
||||
|
||||
Legacy browser using Twill library (deprecated, use Playwright).
|
||||
|
||||
## Test Driver
|
||||
|
||||
`ToolShedTestDriver` sets up embedded shed server:
|
||||
|
||||
@@ -35,11 +35,6 @@ class ShedBrowser(metaclass=abc.ABCMeta):
|
||||
def submit_form_with_name(self, form_name: str, button="runtool_btn", **kwd):
|
||||
"""Submit the target button."""
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def is_twill(self) -> bool:
|
||||
"""Return whether this is a twill browser."""
|
||||
|
||||
@abc.abstractmethod
|
||||
def edit_repository_categories(self, categories_to_add: list[str], categories_to_remove: list[str]) -> None:
|
||||
"""Select some new categories and then restore the component."""
|
||||
|
||||
@@ -157,7 +157,7 @@ class ToolShedTestDriver(driver_util.TestDriver):
|
||||
tool_shed_test_port = tool_shed_server_wrapper.port
|
||||
log.info(f"Functional tests will be run against {tool_shed_test_host}:{tool_shed_test_port}")
|
||||
|
||||
# Used by get_filename in tool shed's twilltestcase
|
||||
# Used by get_filename in tool shed's testcase
|
||||
if "TOOL_SHED_TEST_FILE_DIR" not in os.environ:
|
||||
os.environ["TOOL_SHED_TEST_FILE_DIR"] = driver_util.TOOL_SHED_TEST_DATA
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class PlaywrightShedBrowser(ShedBrowser):
|
||||
|
||||
from galaxy.util import smart_str
|
||||
|
||||
with tempfile.NamedTemporaryFile(suffix=suffix, prefix="twilltestcase-", delete=False) as fh:
|
||||
with tempfile.NamedTemporaryFile(suffix=suffix, prefix="testcase-", delete=False) as fh:
|
||||
fh.write(smart_str(content))
|
||||
return fh.name
|
||||
|
||||
@@ -163,10 +163,6 @@ class PlaywrightShedBrowser(ShedBrowser):
|
||||
select_locator.select_option(label=usernames)
|
||||
self.submit_form_with_name("user_access", "user_access_button")
|
||||
|
||||
@property
|
||||
def is_twill(self) -> bool:
|
||||
return False
|
||||
|
||||
def logout_if_logged_in(self, assert_logged_out=True):
|
||||
self._page.wait_for_selector(f"{Locators.toolbar_login}, {Locators.toolbar_logout}")
|
||||
logout_locator = self._page.locator(Locators.toolbar_logout)
|
||||
|
||||
@@ -5,12 +5,12 @@ from pathlib import Path
|
||||
from playwright.sync_api import Page
|
||||
|
||||
from .playwrightbrowser import PlaywrightShedBrowser
|
||||
from .twilltestcase import ShedTwillTestCase
|
||||
from .testcase import ShedTestCase
|
||||
|
||||
SCREENSHOT_DIR_ENV = "TOOL_SHED_TEST_SCREENSHOTS"
|
||||
|
||||
|
||||
class PlaywrightTestCase(ShedTwillTestCase):
|
||||
class PlaywrightTestCase(ShedTestCase):
|
||||
"""Base class for Playwright-based frontend tests."""
|
||||
|
||||
@property
|
||||
|
||||
@@ -77,10 +77,6 @@ from . import (
|
||||
from .api import ShedApiTestCase
|
||||
from .browser import ShedBrowser
|
||||
from .playwrightbrowser import PlaywrightShedBrowser
|
||||
from .twillbrowser import (
|
||||
page_content,
|
||||
visit_url,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy.model.scoped_session import install_model_scoped_session
|
||||
@@ -196,8 +192,10 @@ class ToolShedInstallationClient(metaclass=abc.ABCMeta):
|
||||
class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient):
|
||||
"""A Galaxy API + Database as a installation target for the tool shed."""
|
||||
|
||||
def __init__(self, testcase: "ShedTwillTestCase"):
|
||||
def __init__(self, testcase: "ShedTestCase"):
|
||||
self.testcase = testcase
|
||||
self._session = requests.Session()
|
||||
self._last_page_content = ""
|
||||
|
||||
def setup(self):
|
||||
self._galaxy_login()
|
||||
@@ -247,7 +245,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient):
|
||||
for data_manager_name in data_manager_names:
|
||||
params = {"id": data_managers[data_manager_name]["guid"]}
|
||||
self._visit_galaxy_url("/data_manager/jobs_list", params=params)
|
||||
content = page_content()
|
||||
content = self._last_page_content
|
||||
for expected in strings_displayed:
|
||||
if content.find(expected) == -1:
|
||||
raise AssertionError(f"Failed to find pattern {expected} in {content}")
|
||||
@@ -257,7 +255,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient):
|
||||
) -> dict[str, Any]:
|
||||
params = {"id": self.testcase.security.encode_id(installed_repository.id)}
|
||||
self._visit_galaxy_url("/admin_toolshed/manage_repository_json", params=params)
|
||||
json = page_content()
|
||||
json = self._last_page_content
|
||||
return loads(json)
|
||||
|
||||
def install_repository(
|
||||
@@ -413,7 +411,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient):
|
||||
|
||||
def _galaxy_token(self):
|
||||
self._visit_galaxy_url("/")
|
||||
html = page_content()
|
||||
html = self._last_page_content
|
||||
token_def_index = html.find("session_csrf_token")
|
||||
token_sep_index = html.find("=", token_def_index)
|
||||
token_quote_start_index = html.find('"', token_sep_index)
|
||||
@@ -426,7 +424,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient):
|
||||
tool_guid = quote_plus(tool_metadata[0]["guid"], safe="")
|
||||
api_url = f"/api/tools/{tool_guid}"
|
||||
self._visit_galaxy_url(api_url)
|
||||
tool_dict = loads(page_content())
|
||||
tool_dict = loads(self._last_page_content)
|
||||
tool_panel_section = tool_dict["panel_section_name"]
|
||||
return tool_panel_section
|
||||
|
||||
@@ -445,11 +443,17 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient):
|
||||
allowed_codes = [200]
|
||||
url = f"{self.testcase.galaxy_url}{url}"
|
||||
url = self.testcase.join_url_and_params(url, params)
|
||||
return visit_url(url, allowed_codes)
|
||||
response = self._session.get(url, timeout=DEFAULT_SOCKET_TIMEOUT)
|
||||
assert response.status_code in allowed_codes, "Invalid HTTP return code {}, allowed codes: {}".format(
|
||||
response.status_code,
|
||||
", ".join(str(code) for code in allowed_codes),
|
||||
)
|
||||
self._last_page_content = response.text
|
||||
return url
|
||||
|
||||
|
||||
class StandaloneToolShedInstallationClient(ToolShedInstallationClient):
|
||||
def __init__(self, testcase: "ShedTwillTestCase"):
|
||||
def __init__(self, testcase: "ShedTestCase"):
|
||||
self.testcase = testcase
|
||||
self.temp_directory = Path(tempfile.mkdtemp(prefix="toolshedtestinstalltarget"))
|
||||
tool_shed_target = ToolShedTarget(
|
||||
@@ -612,13 +616,11 @@ class StandaloneToolShedInstallationClient(ToolShedInstallationClient):
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("shed_browser")
|
||||
class ShedTwillTestCase(ShedApiTestCase):
|
||||
class ShedTestCase(ShedApiTestCase):
|
||||
"""Class of FunctionalTestCase geared toward HTML interactions using the Twill library."""
|
||||
|
||||
requires_galaxy: bool = False
|
||||
_installation_client: Optional[
|
||||
Union[StandaloneToolShedInstallationClient, GalaxyInteractorToolShedInstallationClient]
|
||||
] = None
|
||||
_installation_client: Optional[ToolShedInstallationClient] = None
|
||||
__browser: Optional[ShedBrowser] = None
|
||||
|
||||
def setUp(self):
|
||||
@@ -629,14 +631,16 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
self.hgweb_config_dir = os.environ.get("TEST_HG_WEB_CONFIG_DIR")
|
||||
self.hgweb_config_manager = hgweb_config.hgweb_config_manager
|
||||
self.hgweb_config_manager.hgweb_config_dir = self.hgweb_config_dir
|
||||
self.tool_shed_test_tmp_dir = os.environ.get("TOOL_SHED_TEST_TMP_DIR", None)
|
||||
self.file_dir = os.environ.get("TOOL_SHED_TEST_FILE_DIR", None)
|
||||
self.tool_shed_test_tmp_dir: str = os.environ.get("TOOL_SHED_TEST_TMP_DIR", "")
|
||||
self.file_dir: str = os.environ.get("TOOL_SHED_TEST_FILE_DIR", "")
|
||||
self.shed_tool_conf = os.environ.get("GALAXY_TEST_SHED_TOOL_CONF")
|
||||
self.test_db_util = test_db_util
|
||||
if os.environ.get("TOOL_SHED_TEST_INSTALL_CLIENT") == "standalone":
|
||||
# TODO: once nose is out of the way - try to get away without
|
||||
# instantiating the unused Galaxy server here.
|
||||
installation_client_class = StandaloneToolShedInstallationClient
|
||||
installation_client_class: Union[
|
||||
type[StandaloneToolShedInstallationClient], type[GalaxyInteractorToolShedInstallationClient]
|
||||
] = StandaloneToolShedInstallationClient
|
||||
full_stack_galaxy = False
|
||||
else:
|
||||
installation_client_class = GalaxyInteractorToolShedInstallationClient
|
||||
@@ -656,12 +660,6 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
assert self.__browser
|
||||
return self.__browser
|
||||
|
||||
def _escape_page_content_if_needed(self, content: str) -> str:
|
||||
# if twill browser is being used - replace spaces with " "
|
||||
if self._browser.is_twill:
|
||||
content = content.replace(" ", " ")
|
||||
return content
|
||||
|
||||
def check_for_strings(self, strings_displayed=None, strings_not_displayed=None):
|
||||
strings_displayed = strings_displayed or []
|
||||
strings_not_displayed = strings_not_displayed or []
|
||||
@@ -837,7 +835,7 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
return self._browser.visit_url(url, allowed_codes=allowed_codes)
|
||||
|
||||
def write_temp_file(self, content, suffix=".html"):
|
||||
with tempfile.NamedTemporaryFile(suffix=suffix, prefix="twilltestcase-", delete=False) as fh:
|
||||
with tempfile.NamedTemporaryFile(suffix=suffix, prefix="testcase-", delete=False) as fh:
|
||||
fh.write(smart_str(content))
|
||||
return fh.name
|
||||
|
||||
@@ -1260,10 +1258,6 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
self._browser.fill_form_value("edit_repository", input_elem_name, kwd[input_elem_name])
|
||||
strings_displayed.append(self.escape_html(kwd[input_elem_name]))
|
||||
self._browser.submit_form_with_name("edit_repository", "edit_repository_button")
|
||||
# TODO: come back to this (and similar conditional below), the problem is check
|
||||
# for strings isn't working with with textboxes I think?
|
||||
if self._browser.is_twill:
|
||||
self.check_for_strings(strings_displayed)
|
||||
if revert:
|
||||
strings_displayed = []
|
||||
# assert original_information[input_elem_name]
|
||||
@@ -1273,8 +1267,6 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
)
|
||||
strings_displayed.append(self.escape_html(original_information[input_elem_name]))
|
||||
self._browser.submit_form_with_name("edit_repository", "edit_repository_button")
|
||||
if self._browser.is_twill:
|
||||
self.check_for_strings(strings_displayed)
|
||||
|
||||
def enable_email_alerts(self, repository: Repository, strings_displayed=None, strings_not_displayed=None) -> None:
|
||||
repository_id = repository.id
|
||||
@@ -1534,7 +1526,7 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
|
||||
def grant_role_to_user(self, user, role):
|
||||
strings_displayed = [self.security.encode_id(role.id), role.name]
|
||||
strings_not_displayed = []
|
||||
strings_not_displayed: list[str] = []
|
||||
self.visit_url("/admin/roles")
|
||||
self.check_for_strings(strings_displayed, strings_not_displayed)
|
||||
params = dict(operation="manage users and groups", id=self.security.encode_id(role.id))
|
||||
@@ -1692,6 +1684,7 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
self.check_for_strings(strings_displayed, strings_not_displayed)
|
||||
|
||||
def reactivate_repository(self, installed_repository):
|
||||
assert self._installation_client
|
||||
self._installation_client.reactivate_repository(installed_repository)
|
||||
|
||||
def reinstall_repository_api(
|
||||
@@ -1703,6 +1696,7 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
):
|
||||
name = installed_repository.name
|
||||
owner = installed_repository.owner
|
||||
assert self._installation_client
|
||||
self._installation_client.install_repository(
|
||||
name,
|
||||
owner,
|
||||
@@ -1816,10 +1810,12 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
|
||||
@property
|
||||
def shed_tool_data_table_conf(self):
|
||||
assert self._installation_client
|
||||
return self._installation_client.shed_tool_data_table_conf
|
||||
|
||||
@property
|
||||
def tool_data_path(self):
|
||||
assert self._installation_client
|
||||
return self._installation_client.tool_data_path
|
||||
|
||||
def _refresh_tool_shed_repository(self, repo: galaxy_model.ToolShedRepository) -> None:
|
||||
@@ -1855,6 +1851,7 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
# </table>
|
||||
# </tables>
|
||||
required_data_table_entry = None
|
||||
assert data_tables is not None
|
||||
for table_elem in data_tables.findall("table"):
|
||||
# The value of table_elem will be something like: <table comment_char="#" name="sam_fa_indexes">
|
||||
for required_data_table_entry in required_data_table_entries:
|
||||
@@ -1867,7 +1864,7 @@ class ShedTwillTestCase(ShedApiTestCase):
|
||||
# The "path" attribute of the "file" tag is the location that Galaxy always uses because the
|
||||
# Galaxy ToolDataTableManager was implemented in such a way that the hard-coded path is used
|
||||
# rather than allowing the location to be a configurable setting like the tool shed requires.
|
||||
file_path = file_elem.get("path", None)
|
||||
file_path = file_elem.get("path", None) if file_elem is not None else None
|
||||
# The value of file_path will be something like: "tool-data/all_fasta.loc"
|
||||
assert (
|
||||
file_path is not None
|
||||
@@ -1,148 +0,0 @@
|
||||
import tempfile
|
||||
|
||||
import twill.commands as tc
|
||||
from twill.browser import FormElement # type: ignore[attr-defined, unused-ignore]
|
||||
|
||||
from galaxy.util import smart_str
|
||||
from .browser import (
|
||||
FormValueType,
|
||||
ShedBrowser,
|
||||
)
|
||||
|
||||
tc.options["equiv_refresh_interval"] = 0
|
||||
# Resetting all repository metadata can take a really long time
|
||||
tc.timeout(240)
|
||||
|
||||
|
||||
def visit_url(url: str, allowed_codes: list[int]) -> str:
|
||||
tc.go(url)
|
||||
return_code = tc.browser.code
|
||||
assert return_code in allowed_codes, "Invalid HTTP return code {}, allowed codes: {}".format(
|
||||
return_code,
|
||||
", ".join(str(code) for code in allowed_codes),
|
||||
)
|
||||
return url
|
||||
|
||||
|
||||
def page_content() -> str:
|
||||
return tc.browser.html
|
||||
|
||||
|
||||
class TwillShedBrowser(ShedBrowser):
|
||||
def visit_url(self, url: str, allowed_codes: list[int]) -> str:
|
||||
return visit_url(url, allowed_codes=allowed_codes)
|
||||
|
||||
def page_content(self) -> str:
|
||||
"""
|
||||
Return the last visited page (usually HTML, but can binary data as
|
||||
well).
|
||||
"""
|
||||
return page_content()
|
||||
|
||||
def check_page_for_string(self, patt: str) -> None:
|
||||
page = self.page_content()
|
||||
if page.find(patt) == -1:
|
||||
fname = self.write_temp_file(page)
|
||||
errmsg = f"no match to '{patt}'\npage content written to '{fname}'\npage: [[{page}]]"
|
||||
raise AssertionError(errmsg)
|
||||
|
||||
def check_string_not_in_page(self, patt: str) -> None:
|
||||
page = self.page_content()
|
||||
if page.find(patt) != -1:
|
||||
fname = self.write_temp_file(page)
|
||||
errmsg = f"string ({patt}) incorrectly displayed in page.\npage content written to '{fname}'"
|
||||
raise AssertionError(errmsg)
|
||||
|
||||
def write_temp_file(self, content, suffix=".html"):
|
||||
with tempfile.NamedTemporaryFile(suffix=suffix, prefix="twilltestcase-", delete=False) as fh:
|
||||
fh.write(smart_str(content))
|
||||
return fh.name
|
||||
|
||||
def submit_form_with_name(self, form_name: str, button="runtool_btn", **kwd):
|
||||
forms_by_name: dict[str, FormElement] = {f.get("name"): f for f in self._show_forms()}
|
||||
form = forms_by_name[form_name]
|
||||
self._submit_form(form, button, **kwd)
|
||||
|
||||
def _show_forms(self) -> list[FormElement]:
|
||||
"""Shows form, helpful for debugging new tests"""
|
||||
return tc.browser.forms
|
||||
|
||||
def submit_form(self, form_no=-1, button="runtool_btn", form=None, **kwd):
|
||||
if form is None:
|
||||
try:
|
||||
form = self._show_forms()[form_no]
|
||||
except IndexError:
|
||||
raise ValueError("No form to submit found")
|
||||
self._submit_form(form, button, **kwd)
|
||||
|
||||
def _submit_form(self, form, button, **kwd):
|
||||
controls = {c.name: c for c in form.inputs}
|
||||
form_name = form.get("name")
|
||||
for control_name, control_value in kwd.items():
|
||||
if control_name not in controls:
|
||||
continue # these cannot be handled safely - cause the test to barf out
|
||||
if not isinstance(control_value, list):
|
||||
control_value = [str(control_value)]
|
||||
control = controls[control_name]
|
||||
control_type = getattr(control, "type", None)
|
||||
if control_type in (
|
||||
"text",
|
||||
"textfield",
|
||||
"submit",
|
||||
"password",
|
||||
"TextareaElement",
|
||||
"checkbox",
|
||||
"radio",
|
||||
None,
|
||||
):
|
||||
for cv in control_value:
|
||||
tc.fv(form_name, control.name, cv)
|
||||
else:
|
||||
# Add conditions for other control types here when necessary.
|
||||
pass
|
||||
tc.submit(button)
|
||||
|
||||
def fill_form_value(self, form_name: str, control_name: str, value: FormValueType):
|
||||
value = str(value)
|
||||
tc.fv(form_name, control_name, value)
|
||||
|
||||
def edit_repository_categories(self, categories_to_add: list[str], categories_to_remove: list[str]) -> None:
|
||||
"""Select some new categories and then restore the component."""
|
||||
strings_displayed = []
|
||||
strings_not_displayed = []
|
||||
for category in categories_to_add:
|
||||
self.fill_form_value("categories", "category_id", f"+{category}")
|
||||
strings_displayed.append(f"selected>{category}")
|
||||
for category in categories_to_remove:
|
||||
self.fill_form_value("categories", "category_id", f"-{category}")
|
||||
strings_not_displayed.append(f"selected>{category}")
|
||||
self.submit_form_with_name("categories", "manage_categories_button")
|
||||
self._check_for_strings(strings_displayed, strings_not_displayed)
|
||||
|
||||
strings_displayed = []
|
||||
strings_not_displayed = []
|
||||
for category in categories_to_remove:
|
||||
self.fill_form_value("categories", "category_id", f"+{category}")
|
||||
strings_displayed.append(f"selected>{category}")
|
||||
for category in categories_to_add:
|
||||
self.fill_form_value("categories", "category_id", f"-{category}")
|
||||
strings_not_displayed.append(f"selected>{category}")
|
||||
self.submit_form_with_name("categories", "manage_categories_button")
|
||||
self._check_for_strings(strings_displayed, strings_not_displayed)
|
||||
|
||||
def grant_users_access(self, usernames: list[str]):
|
||||
for username in usernames:
|
||||
self.fill_form_value("user_access", "allow_push", f"+{username}")
|
||||
self.submit_form_with_name("user_access", "user_access_button")
|
||||
|
||||
@property
|
||||
def is_twill(self) -> bool:
|
||||
return True
|
||||
|
||||
def _check_for_strings(self, strings_displayed: list[str], strings_not_displayed: list[str]):
|
||||
if strings_displayed:
|
||||
for check_str in strings_displayed:
|
||||
self.check_page_for_string(check_str)
|
||||
if strings_not_displayed:
|
||||
for check_str in strings_not_displayed:
|
||||
self.check_string_not_in_page(check_str)
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
import pytest
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
repository_name = "filtering_0000"
|
||||
repository_description = "Galaxy's filtering tool for test 0000"
|
||||
@@ -12,7 +12,7 @@ repository_long_description = "Long description of Galaxy's filtering tool for t
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
class TestBasicRepositoryFeatures(ShedTestCase):
|
||||
"""Test core repository features."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
@@ -73,7 +73,6 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
def test_0040_verify_repository(self):
|
||||
"""Display basic repository pages"""
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
latest_changeset_revision = self.get_repository_tip(repository)
|
||||
self.check_for_valid_tools(repository, strings_displayed=["Filter1"])
|
||||
self.check_count_of_metadata_revisions_associated_with_repository(repository, metadata_count=1)
|
||||
tip = self.get_repository_tip(repository)
|
||||
@@ -97,11 +96,6 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
repository, strings_displayed=[f"Repository '{repository.name}' revision", "(repository tip)"]
|
||||
)
|
||||
strings = ["Uploaded filtering 1.1.0"]
|
||||
if self._browser.is_twill:
|
||||
# this appears in a link - it isn't how one would check this
|
||||
# in playwright. But also we're testing the mercurial page
|
||||
# here so this is probably a questionable check overall.
|
||||
strings += [latest_changeset_revision]
|
||||
self.display_repository_clone_page(
|
||||
common.test_user_1_name,
|
||||
repository_name,
|
||||
@@ -112,23 +106,13 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
"""Upload filtering.txt file associated with tool version 1.1.0."""
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
self.add_file_to_repository(repository, "filtering/filtering_0000.txt")
|
||||
expected = self._escape_page_content_if_needed("Readme file for filtering 1.1.0")
|
||||
expected = "Readme file for filtering 1.1.0"
|
||||
self.display_manage_repository_page(repository, strings_displayed=[expected])
|
||||
|
||||
def test_0060_upload_filtering_test_data(self):
|
||||
"""Upload filtering test data."""
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
self.add_tar_to_repository(repository, "filtering/filtering_test_data.tar")
|
||||
if self._browser.is_twill:
|
||||
# probably not porting this functionality - just test
|
||||
# with Twill for older UI and drop when that is all dropped
|
||||
self.display_repository_file_contents(
|
||||
repository=repository,
|
||||
filename="1.bed",
|
||||
filepath="test-data",
|
||||
strings_displayed=[],
|
||||
strings_not_displayed=[],
|
||||
)
|
||||
self.check_repository_metadata(repository, tip_only=True)
|
||||
|
||||
def test_0065_upload_filtering_2_2_0(self):
|
||||
@@ -165,10 +149,10 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
"""Upload readme.txt file associated with tool version 2.2.0."""
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
self.add_file_to_repository(repository, "readme.txt")
|
||||
content = self._escape_page_content_if_needed("This is a readme file.")
|
||||
content = "This is a readme file."
|
||||
self.display_manage_repository_page(repository, strings_displayed=[content])
|
||||
# Verify that there is a different readme file for each metadata revision.
|
||||
readme_content = self._escape_page_content_if_needed("Readme file for filtering 1.1.0")
|
||||
readme_content = "Readme file for filtering 1.1.0"
|
||||
self.display_manage_repository_page(
|
||||
repository,
|
||||
strings_displayed=[
|
||||
@@ -182,7 +166,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
self.delete_files_from_repository(repository, filenames=["readme.txt"])
|
||||
self.check_count_of_metadata_revisions_associated_with_repository(repository, metadata_count=2)
|
||||
readme_content = self._escape_page_content_if_needed("Readme file for filtering 1.1.0")
|
||||
readme_content = "Readme file for filtering 1.1.0"
|
||||
self.display_manage_repository_page(repository, strings_displayed=[readme_content])
|
||||
|
||||
def test_0090_verify_repository_metadata(self):
|
||||
@@ -223,7 +207,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
# Upload readme.txt to the filtering_0000 repository and verify that it is now displayed.
|
||||
self.add_file_to_repository(repository, "filtering/readme.txt")
|
||||
content = self._escape_page_content_if_needed("These characters should not")
|
||||
content = "These characters should not"
|
||||
self.display_manage_repository_page(repository, strings_displayed=[content])
|
||||
|
||||
def test_0130_verify_handling_of_invalid_characters(self):
|
||||
@@ -241,7 +225,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
break
|
||||
# Check for the changeset revision, repository name, owner username, 'repos' in the clone url, and the captured
|
||||
# unicode decoding error message.
|
||||
content = self._escape_page_content_if_needed("These characters should not")
|
||||
content = "These characters should not"
|
||||
strings_displayed = [
|
||||
f"{revision_number}:{revision_hash}",
|
||||
"filtering_0000",
|
||||
@@ -265,10 +249,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase):
|
||||
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
|
||||
encoded_repository_id = repository.id
|
||||
assert encoded_repository_id
|
||||
strings_displayed = ["Invalid+changeset+revision"]
|
||||
view_repo_url = (
|
||||
f"/repository/view_repository?id={encoded_repository_id}&changeset_revision=nonsensical_changeset"
|
||||
)
|
||||
self.visit_url(view_repo_url)
|
||||
if self._browser.is_twill:
|
||||
self.check_for_strings(strings_displayed=strings_displayed, strings_not_displayed=[])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
repository_name = "freebayes_0010"
|
||||
repository_description = "Galaxy's freebayes tool"
|
||||
@@ -18,7 +18,7 @@ repository_long_description = "Long description of Galaxy's freebayes tool"
|
||||
"""
|
||||
|
||||
|
||||
class TestFreebayesRepository(ShedTwillTestCase):
|
||||
class TestFreebayesRepository(ShedTestCase):
|
||||
"""Testing freebayes with tool data table entries, .loc files, and tool dependencies."""
|
||||
|
||||
def test_0000_create_or_login_admin_user(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0020"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -10,7 +10,7 @@ emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools
|
||||
emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools for test 0020"
|
||||
|
||||
|
||||
class TestBasicRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestBasicRepositoryDependencies(ShedTestCase):
|
||||
"""Testing emboss 5 with repository dependencies."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0030"
|
||||
column_maker_repository_description = "Add column"
|
||||
@@ -12,7 +12,7 @@ emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools
|
||||
emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools for test 0030"
|
||||
|
||||
|
||||
class TestRepositoryDependencyRevisions(ShedTwillTestCase):
|
||||
class TestRepositoryDependencyRevisions(ShedTestCase):
|
||||
"""Test dependencies on different revisions of a repository."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
freebayes_repository_name = "freebayes_0040"
|
||||
freebayes_repository_description = "Galaxy's freebayes tool for test 0040"
|
||||
@@ -13,7 +13,7 @@ CATEGORY_NAME = "test_0040_repository_circular_dependencies"
|
||||
CATEGORY_DESC = "Testing handling of circular repository dependencies."
|
||||
|
||||
|
||||
class TestRepositoryCircularDependencies(ShedTwillTestCase):
|
||||
class TestRepositoryCircularDependencies(ShedTestCase):
|
||||
"""Verify that the code correctly displays repositories with circular repository dependencies."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
emboss_repository_name = "emboss_0050"
|
||||
emboss_repository_description = "Galaxy's emboss tool"
|
||||
@@ -29,7 +29,7 @@ category_name = "Test 0050 Circular Dependencies 5 Levels"
|
||||
category_description = "Test circular dependency features"
|
||||
|
||||
|
||||
class TestRepositoryCircularDependenciesToNLevels(ShedTwillTestCase):
|
||||
class TestRepositoryCircularDependenciesToNLevels(ShedTestCase):
|
||||
"""Verify that the code correctly handles circular dependencies down to n levels."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
repository_name = "bismark_0070"
|
||||
repository_description = "Galaxy's bismark wrapper"
|
||||
@@ -8,7 +8,7 @@ category_name = "Test 0070 Invalid Tool Revisions"
|
||||
category_description = "Tests for a repository with invalid tool revisions."
|
||||
|
||||
|
||||
class TestBismarkRepository(ShedTwillTestCase):
|
||||
class TestBismarkRepository(ShedTestCase):
|
||||
"""Testing bismark with valid and invalid tool entries."""
|
||||
|
||||
def test_0000_create_or_login_admin_user(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_repository_name = "column_maker_0080"
|
||||
column_repository_description = "Add column"
|
||||
@@ -13,7 +13,7 @@ category_name = "Test 0080 Advanced Circular Dependencies"
|
||||
category_description = "Test circular dependency features"
|
||||
|
||||
|
||||
class TestRepositoryCircularDependencies(ShedTwillTestCase):
|
||||
class TestRepositoryCircularDependencies(ShedTestCase):
|
||||
"""Verify that the code correctly handles circular dependencies."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
emboss_repository_name = "emboss_0090"
|
||||
emboss_repository_description = "Galaxy's emboss tool"
|
||||
@@ -25,7 +25,7 @@ category_name = "Test 0090 Tool Search And Installation"
|
||||
category_description = "Test 0090 Tool Search And Installation"
|
||||
|
||||
|
||||
class TestRepositoryCircularDependenciesAgain(ShedTwillTestCase):
|
||||
class TestRepositoryCircularDependenciesAgain(ShedTestCase):
|
||||
"""Test more features related to repository dependencies."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -19,7 +19,7 @@ category_name = "Test 0100 Complex Repository Dependencies"
|
||||
category_description = "Test 0100 Complex Repository Dependencies"
|
||||
|
||||
|
||||
class TestComplexRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestComplexRepositoryDependencies(ShedTestCase):
|
||||
"""Test features related to complex repository dependencies."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0110"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -13,7 +13,7 @@ category_name = "Test 0110 Invalid Repository Dependencies"
|
||||
category_desc = "Test 0110 Invalid Repository Dependencies"
|
||||
|
||||
|
||||
class TestBasicRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestBasicRepositoryDependencies(ShedTestCase):
|
||||
"""Testing emboss 5 with repository dependencies."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
datatypes_repository_name = "blast_datatypes_0120"
|
||||
datatypes_repository_description = "Galaxy applicable datatypes for BLAST"
|
||||
@@ -21,7 +21,7 @@ Tool shed side:
|
||||
"""
|
||||
|
||||
|
||||
class TestRepositoryMultipleOwners(ShedTwillTestCase):
|
||||
class TestRepositoryMultipleOwners(ShedTestCase):
|
||||
def test_0000_initiate_users(self):
|
||||
"""Create necessary user accounts and login as an admin user.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -22,7 +22,7 @@ src="/repository/static/images/<id>/count_modes.png"
|
||||
"""
|
||||
|
||||
|
||||
class TestToolHelpImages(ShedTwillTestCase):
|
||||
class TestToolHelpImages(ShedTestCase):
|
||||
"""Test features related to tool help images."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_repository_name = "column_maker_0150"
|
||||
column_repository_description = "Add column"
|
||||
@@ -27,7 +27,7 @@ Verify that convert_chars was installed first, contrary to the ordering that wou
|
||||
"""
|
||||
|
||||
|
||||
class TestSimplePriorInstallation(ShedTwillTestCase):
|
||||
class TestSimplePriorInstallation(ShedTestCase):
|
||||
"""Test features related to datatype converters."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
filter_repository_name = "filtering_0160"
|
||||
filter_repository_description = "Galaxy's filtering tool for test 0160"
|
||||
@@ -26,7 +26,7 @@ Verify display.
|
||||
"""
|
||||
|
||||
|
||||
class TestSimplePriorInstallation(ShedTwillTestCase):
|
||||
class TestSimplePriorInstallation(ShedTestCase):
|
||||
"""Test features related to datatype converters."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
matplotlib_repository_name = "package_matplotlib_1_2_0170"
|
||||
matplotlib_repository_description = (
|
||||
@@ -29,7 +29,7 @@ category_description = "Test 0170 Prior Installation Complex Dependencies"
|
||||
"""
|
||||
|
||||
|
||||
class TestComplexPriorInstallation(ShedTwillTestCase):
|
||||
class TestComplexPriorInstallation(ShedTestCase):
|
||||
"""Test features related to datatype converters."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0020"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -40,7 +40,7 @@ category_0050_description = "Test circular dependency features"
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestResetAllRepositoryMetadata(ShedTwillTestCase):
|
||||
class TestResetAllRepositoryMetadata(ShedTestCase):
|
||||
"""Verify that the "Reset selected metadata" feature works."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -2,7 +2,7 @@ import logging
|
||||
import os
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -19,7 +19,7 @@ category_description = "Test 0310 for verifying the tool shed http interface to
|
||||
"""
|
||||
|
||||
|
||||
class TestHgWebFeatures(ShedTwillTestCase):
|
||||
class TestHgWebFeatures(ShedTestCase):
|
||||
"""Test http mercurial interface."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -25,7 +25,7 @@ first_changeset_hash = ""
|
||||
"""
|
||||
|
||||
|
||||
class TestRepositoryCitableURLs(ShedTwillTestCase):
|
||||
class TestRepositoryCitableURLs(ShedTestCase):
|
||||
"""Test repository citable url features."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
@@ -83,9 +83,6 @@ class TestRepositoryCitableURLs(ShedTwillTestCase):
|
||||
"""
|
||||
test_user_1 = self.test_db_util.get_user(common.test_user_1_email)
|
||||
encoded_user_id = self.security.encode_id(test_user_1.id)
|
||||
# Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly,
|
||||
# then directly load the url that the iframe should be loading and check for the expected strings.
|
||||
# The iframe should point to /repository/browse_repositories?user_id=<encoded user ID>&operation=repositories_by_user
|
||||
strings_displayed: list[str] = []
|
||||
strings_displayed_in_iframe = ["user1", "filtering_0420", repository_description]
|
||||
self.load_citable_url(
|
||||
@@ -109,14 +106,11 @@ class TestRepositoryCitableURLs(ShedTwillTestCase):
|
||||
test_user_1 = self.test_db_util.get_user(common.test_user_1_email)
|
||||
encoded_user_id = self.security.encode_id(test_user_1.id)
|
||||
encoded_repository_id = repository.id
|
||||
# Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly,
|
||||
# then directly load the url that the iframe should be loading and check for the expected strings.
|
||||
# The iframe should point to /repository/bview_repository?id=<encoded repository ID>
|
||||
strings_displayed: list[str] = []
|
||||
strings_displayed_in_iframe = [
|
||||
"user1",
|
||||
"filtering_0420",
|
||||
self._escape_page_content_if_needed(repository_long_description),
|
||||
repository_long_description,
|
||||
]
|
||||
strings_displayed_in_iframe.append(self.get_repository_tip(repository))
|
||||
self.load_citable_url(
|
||||
@@ -140,14 +134,11 @@ class TestRepositoryCitableURLs(ShedTwillTestCase):
|
||||
test_user_1 = self.test_db_util.get_user(common.test_user_1_email)
|
||||
encoded_user_id = self.security.encode_id(test_user_1.id)
|
||||
encoded_repository_id = repository.id
|
||||
# Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly,
|
||||
# then directly load the url that the iframe should be loading and check for the expected strings.
|
||||
# The iframe should point to /repository/view_repository?id=<encoded repository ID>
|
||||
strings_displayed: list[str] = []
|
||||
strings_displayed_in_iframe = [
|
||||
"user1",
|
||||
"filtering_0420",
|
||||
self._escape_page_content_if_needed(repository_long_description),
|
||||
repository_long_description,
|
||||
first_changeset_hash,
|
||||
]
|
||||
self.load_citable_url(
|
||||
@@ -185,9 +176,6 @@ class TestRepositoryCitableURLs(ShedTwillTestCase):
|
||||
"""
|
||||
test_user_1 = self.test_db_util.get_user(common.test_user_1_email)
|
||||
encoded_user_id = self.security.encode_id(test_user_1.id)
|
||||
# Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly,
|
||||
# then directly load the url that the iframe should be loading and check for the expected strings.
|
||||
# The iframe should point to /repository/browse_repositories?user_id=<encoded user ID>&operation=repositories_by_user
|
||||
strings_displayed = ["Repository user1/!!invalid!! is not found"]
|
||||
strings_displayed_in_iframe: list[str] = []
|
||||
self.load_citable_url(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -21,7 +21,7 @@ freebayes_repository_long_description = "Long description of Freebayes tool for
|
||||
"""
|
||||
|
||||
|
||||
class TestToolShedBrowseUtilities(ShedTwillTestCase):
|
||||
class TestToolShedBrowseUtilities(ShedTestCase):
|
||||
"""Test browsing for Galaxy utilities."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from tool_shed_client.schema import Repository
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_repository_name = "column_maker_0440"
|
||||
column_repository_description = "Add column"
|
||||
@@ -50,7 +50,7 @@ Tool dependencies:
|
||||
"""
|
||||
|
||||
|
||||
class TestDeletedDependencies(ShedTwillTestCase):
|
||||
class TestDeletedDependencies(ShedTestCase):
|
||||
"""Test metadata setting when dependency definitions are deleted."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -54,7 +54,7 @@ For all steps, verify that the generated dependency points to the tip of the spe
|
||||
"""
|
||||
|
||||
|
||||
class TestAutomaticDependencyRevision(ShedTwillTestCase):
|
||||
class TestAutomaticDependencyRevision(ShedTestCase):
|
||||
"""Test defining repository dependencies without specifying the changeset revision."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -60,7 +60,7 @@ emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 t
|
||||
"""
|
||||
|
||||
|
||||
class TestEnvironmentInheritance(ShedTwillTestCase):
|
||||
class TestEnvironmentInheritance(ShedTestCase):
|
||||
"""Test referencing environment variables that were defined in a separate tool dependency."""
|
||||
|
||||
def test_0000_initiate_users_and_category(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -20,7 +20,7 @@ repository_long_description = "This repository is in the test suite 0480"
|
||||
"""
|
||||
|
||||
|
||||
class TestDependencyDefinitionValidation(ShedTwillTestCase):
|
||||
class TestDependencyDefinitionValidation(ShedTestCase):
|
||||
"""Test the tool shed's tool dependency XML validation."""
|
||||
|
||||
def test_0000_initiate_users_and_category(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -31,7 +31,7 @@ category_description = "Verify the functionality of the code that handles the re
|
||||
"""
|
||||
|
||||
|
||||
class TestRepositoryAdminRole(ShedTwillTestCase):
|
||||
class TestRepositoryAdminRole(ShedTestCase):
|
||||
"""Verify that the code correctly handles the repository admin role."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -43,7 +43,7 @@ category_description = "Verify metadata updates"
|
||||
"""
|
||||
|
||||
|
||||
class TestGetUpdatedMetadata(ShedTwillTestCase):
|
||||
class TestGetUpdatedMetadata(ShedTestCase):
|
||||
"""Verify that updated repositories still have correct dependency links."""
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
repo_name = "filtering_0000"
|
||||
repo_description = "Galaxy's filtering tool"
|
||||
|
||||
|
||||
class TestBasicToolShedFeatures(ShedTwillTestCase):
|
||||
class TestBasicToolShedFeatures(ShedTestCase):
|
||||
"""Test installing a basic repository."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
repository_name = "freebayes_0010"
|
||||
repository_description = "Galaxy's freebayes tool"
|
||||
@@ -10,7 +10,7 @@ category_name = "Test 0010 Repository With Tool Dependencies"
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestToolWithToolDependencies(ShedTwillTestCase):
|
||||
class TestToolWithToolDependencies(ShedTestCase):
|
||||
"""Test installing a repository with tool dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0020"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -10,7 +10,7 @@ emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools
|
||||
emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools for test 0020"
|
||||
|
||||
|
||||
class TestToolWithRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestToolWithRepositoryDependencies(ShedTestCase):
|
||||
"""Test installing a repository with repository dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0030"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -14,7 +14,7 @@ emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 t
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestRepositoryWithDependencyRevisions(ShedTwillTestCase):
|
||||
class TestRepositoryWithDependencyRevisions(ShedTestCase):
|
||||
"""Test installing a repository with dependency revisions."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
freebayes_repository_name = "freebayes_0040"
|
||||
freebayes_repository_description = "Galaxy's freebayes tool for test 0040"
|
||||
@@ -14,7 +14,7 @@ category_name = "test_0040_repository_circular_dependencies"
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestInstallingCircularDependencies(ShedTwillTestCase):
|
||||
class TestInstallingCircularDependencies(ShedTestCase):
|
||||
"""Verify that the code correctly handles installing repositories with circular dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
emboss_repository_name = "emboss_0050"
|
||||
emboss_repository_description = "Galaxy's emboss tool"
|
||||
@@ -31,7 +31,7 @@ category_description = "Test circular dependency features"
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestInstallRepositoryCircularDependencies(ShedTwillTestCase):
|
||||
class TestInstallRepositoryCircularDependencies(ShedTestCase):
|
||||
"""Verify that the code correctly handles circular dependencies down to n levels."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
repository_name = "bismark_0070"
|
||||
repository_description = "Galaxy's bismark wrapper"
|
||||
@@ -8,7 +8,7 @@ category_name = "Test 0070 Invalid Tool Revisions"
|
||||
category_description = "Test 1070 for a repository with an invalid tool."
|
||||
|
||||
|
||||
class TestFreebayesRepository(ShedTwillTestCase):
|
||||
class TestFreebayesRepository(ShedTestCase):
|
||||
"""Test repository with multiple revisions with invalid tools."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_repository_name = "column_maker_0080"
|
||||
column_repository_description = "Add column"
|
||||
@@ -19,7 +19,7 @@ log = logging.getLogger(__name__)
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestRepositoryDependencies(ShedTestCase):
|
||||
"""Testing uninstalling and reinstalling repository dependencies, and setting tool panel sections."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_repository_name = "column_maker_1085"
|
||||
column_repository_description = "Add column"
|
||||
@@ -17,7 +17,7 @@ category_description = "Test circular dependency features"
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestRepositoryDependencies(ShedTestCase):
|
||||
"""Testing the behavior of repository dependencies with tool panel sections."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_repository_name = "column_maker_1087"
|
||||
column_repository_description = "Add column"
|
||||
@@ -13,7 +13,7 @@ category_name = "Test 1087 Advanced Circular Dependencies"
|
||||
category_description = "Test circular dependency features"
|
||||
|
||||
|
||||
class TestRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestRepositoryDependencies(ShedTestCase):
|
||||
"""Test installing a repository, then updating it to include repository dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
bwa_base_repository_name = "bwa_base_repository_0100"
|
||||
bwa_base_repository_description = "BWA Base"
|
||||
@@ -20,7 +20,7 @@ category_description = "Test 0100 Complex Repository Dependencies"
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestInstallingComplexRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestInstallingComplexRepositoryDependencies(ShedTestCase):
|
||||
"""Test features related to installing repositories with complex repository dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0110"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -14,7 +14,7 @@ category_desc = "Test 0110 Invalid Repository Dependencies"
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestBasicRepositoryDependencies(ShedTwillTestCase):
|
||||
class TestBasicRepositoryDependencies(ShedTestCase):
|
||||
"""Testing emboss 5 with repository dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
datatypes_repository_name = "blast_datatypes_0120"
|
||||
datatypes_repository_description = "Galaxy applicable datatypes for BLAST"
|
||||
@@ -27,7 +27,7 @@ Galaxy side:
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestInstallRepositoryMultipleOwners(ShedTwillTestCase):
|
||||
class TestInstallRepositoryMultipleOwners(ShedTestCase):
|
||||
requires_galaxy = True
|
||||
|
||||
def test_0000_initiate_users(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -18,7 +18,7 @@ category_description = "Test 0140 Tool Help Images"
|
||||
# src="/repository/static/images/<id>/count_modes.png"
|
||||
|
||||
|
||||
class TestToolHelpImages(ShedTwillTestCase):
|
||||
class TestToolHelpImages(ShedTestCase):
|
||||
"""Test features related to tool help images."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -33,7 +33,7 @@ Verify that convert_chars was installed first, contrary to the ordering that wou
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestSimplePriorInstallation(ShedTwillTestCase):
|
||||
class TestSimplePriorInstallation(ShedTestCase):
|
||||
"""Test features related to datatype converters."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -46,7 +46,7 @@ Verify that convert_chars was installed first, contrary to the ordering that wou
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestSimplePriorInstallation(ShedTwillTestCase):
|
||||
class TestSimplePriorInstallation(ShedTestCase):
|
||||
"""Test features related to datatype converters."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
matplotlib_repository_name = "package_matplotlib_1_2_0170"
|
||||
matplotlib_repository_description = (
|
||||
@@ -33,7 +33,7 @@ category_description = "Test 0170 Prior Installation Complex Dependencies"
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestComplexPriorInstallation(ShedTwillTestCase):
|
||||
class TestComplexPriorInstallation(ShedTestCase):
|
||||
"""Test features related to datatype converters."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
|
||||
class TestUninstallingAndReinstallingRepositories(ShedTwillTestCase):
|
||||
class TestUninstallingAndReinstallingRepositories(ShedTestCase):
|
||||
"""Test uninstalling and reinstalling a basic repository."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
|
||||
class TestUninstallingAndReinstallingRepositories(ShedTwillTestCase):
|
||||
class TestUninstallingAndReinstallingRepositories(ShedTestCase):
|
||||
"""Test uninstalling and reinstalling a repository with tool dependencies."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0030"
|
||||
column_maker_repository_description = "Add column"
|
||||
@@ -14,7 +14,7 @@ emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 t
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestUninstallingAndReinstallingRepositories(ShedTwillTestCase):
|
||||
class TestUninstallingAndReinstallingRepositories(ShedTestCase):
|
||||
"""Test uninstalling and reinstalling a repository with repository dependency revisions."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
column_maker_repository_name = "column_maker_0020"
|
||||
column_maker_repository_description = "A flexible aligner."
|
||||
@@ -39,7 +39,7 @@ repository_datatypes_count = 0
|
||||
running_standalone = False
|
||||
|
||||
|
||||
class TestResetInstalledRepositoryMetadata(ShedTwillTestCase):
|
||||
class TestResetInstalledRepositoryMetadata(ShedTestCase):
|
||||
"""Verify that the "Reset selected metadata" feature works."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -2,7 +2,7 @@ import logging
|
||||
import time
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -21,7 +21,7 @@ category_description = "Functional test suite to test the update manager."
|
||||
"""
|
||||
|
||||
|
||||
class TestUpdateManager(ShedTwillTestCase):
|
||||
class TestUpdateManager(ShedTestCase):
|
||||
"""Test the Galaxy update manager."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -32,7 +32,7 @@ In Galaxy:
|
||||
"""
|
||||
|
||||
|
||||
class TestRepairRepository(ShedTwillTestCase):
|
||||
class TestRepairRepository(ShedTestCase):
|
||||
"""Test repairing an installed repository."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -25,7 +25,7 @@ data_manager_tar_file = "1460_files/data_manager_files/test_data_manager.tar"
|
||||
# TODO: Allow testing actual Execution of installed Data Manager Tool.
|
||||
|
||||
|
||||
class TestDataManagers(ShedTwillTestCase):
|
||||
class TestDataManagers(ShedTestCase):
|
||||
"""Test installing a repository containing a Data Manager."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from ..base import common
|
||||
from ..base.twilltestcase import ShedTwillTestCase
|
||||
from ..base.testcase import ShedTestCase
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -24,7 +24,7 @@ category_description = (
|
||||
"""
|
||||
|
||||
|
||||
class TestUpdateInstalledRepository(ShedTwillTestCase):
|
||||
class TestUpdateInstalledRepository(ShedTestCase):
|
||||
"""Verify that the code correctly handles updating an installed repository, then uninstalling and reinstalling."""
|
||||
|
||||
requires_galaxy = True
|
||||
|
||||
@@ -710,8 +710,6 @@ check_untyped_defs = False
|
||||
check_untyped_defs = False
|
||||
[mypy-test.functional.test_toolbox_pytest]
|
||||
check_untyped_defs = False
|
||||
[mypy-tool_shed.test.base.twilltestcase]
|
||||
check_untyped_defs = False
|
||||
[mypy-galaxy_test.selenium.test_histories_published]
|
||||
check_untyped_defs = False
|
||||
[mypy-galaxy_test.selenium.test_histories_list]
|
||||
|
||||
@@ -57,7 +57,6 @@ install_requires =
|
||||
slowapi
|
||||
starlette
|
||||
starlette-context
|
||||
twill
|
||||
typing-extensions
|
||||
WebOb
|
||||
Whoosh
|
||||
@@ -65,7 +64,7 @@ packages = find:
|
||||
python_requires = >=3.10
|
||||
|
||||
[options.extras_require]
|
||||
test =
|
||||
test =
|
||||
pytest
|
||||
|
||||
[options.packages.find]
|
||||
|
||||
@@ -152,7 +152,6 @@ test = [
|
||||
"testfixtures",
|
||||
"total-perspective-vortex>=3.1.1,<4", # https://github.com/galaxyproject/total-perspective-vortex/pull/173
|
||||
"tuspy",
|
||||
"twill>=3.2.5", # Python 3.13 support
|
||||
"watchdog",
|
||||
"Werkzeug",
|
||||
]
|
||||
|
||||
+1
-2
@@ -46,8 +46,7 @@ The main test types are as follows:
|
||||
quickly test just a component or a few components of Galaxy's backend code.
|
||||
- Selenium: These are full stack tests meant to test the Galaxy UI with real
|
||||
browsers and are located in lib/galaxy_test/selenium.
|
||||
- ToolShed: These are web tests that use the older Python web testing
|
||||
framework twill to test ToolShed related functionality. These are
|
||||
- ToolShed: These are tests that test ToolShed related functionality. These are
|
||||
located in lib/tool_shed/test.
|
||||
|
||||
Python testing is done via pytest. Specific tests can be selected
|
||||
|
||||
Reference in New Issue
Block a user