mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
Replace `unittest.TestCase` with pytest-based partial re-implementation
Also: - Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected by pytest only because they were `unittest.TestCase` derived, but normally pytest collects only test classes whose name starts with `Test`, see https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import pytest
|
||||
|
||||
|
||||
class TestCase:
|
||||
"""Partial re-implementation of standard library unittest.TestCase using
|
||||
pytest methods
|
||||
See https://docs.pytest.org/en/latest/how-to/xunit_setup.html for a
|
||||
description of the pytest setup/teardown methods.
|
||||
|
||||
Most assert*() methods of unittest.TestCase are not reimplemented here on
|
||||
purpose, normal assert statements should be used instead."""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def setup_class(cls):
|
||||
cls.setUpClass()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def teardown_class(cls):
|
||||
cls.tearDownClass()
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def setup_method(self):
|
||||
self.setUp()
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def teardown_method(self):
|
||||
self.tearDown()
|
||||
|
||||
def assertRaises(self, exception):
|
||||
return pytest.raises(exception)
|
||||
|
||||
def assertRaisesRegex(self, exception, regex):
|
||||
return pytest.raises(exception, match=regex)
|
||||
@@ -42,7 +42,7 @@ class BaseHistories:
|
||||
assert len(contents) == n, contents
|
||||
|
||||
|
||||
class HistoriesApiTestCase(ApiTestCase, BaseHistories):
|
||||
class TestHistoriesApi(ApiTestCase, BaseHistories):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
@@ -556,7 +556,7 @@ class ImportExportTests(BaseHistories):
|
||||
elements_checker(imported_collection_metadata["elements"])
|
||||
|
||||
|
||||
class ImportExportHistoryTestCase(ApiTestCase, ImportExportTests):
|
||||
class TestImportExportHistory(ApiTestCase, ImportExportTests):
|
||||
task_based = False
|
||||
|
||||
def setUp(self):
|
||||
@@ -564,7 +564,7 @@ class ImportExportHistoryTestCase(ApiTestCase, ImportExportTests):
|
||||
self._set_up_populators()
|
||||
|
||||
|
||||
class SharingHistoryTestCase(ApiTestCase, BaseHistories, SharingApiTests):
|
||||
class TestSharingHistory(ApiTestCase, BaseHistories, SharingApiTests):
|
||||
"""Tests specific for the particularities of sharing Histories."""
|
||||
|
||||
api_name = "histories"
|
||||
|
||||
@@ -19,7 +19,6 @@ from galaxy_test.base.api_asserts import (
|
||||
)
|
||||
from galaxy_test.base.populators import (
|
||||
BaseDatasetCollectionPopulator,
|
||||
BaseDatasetPopulator,
|
||||
DatasetCollectionPopulator,
|
||||
DatasetPopulator,
|
||||
LibraryPopulator,
|
||||
@@ -54,7 +53,7 @@ MINIMAL_TOOL_NO_ID = {
|
||||
|
||||
|
||||
class TestsTools:
|
||||
dataset_populator: BaseDatasetPopulator
|
||||
dataset_populator: DatasetPopulator
|
||||
dataset_collection_populator: BaseDatasetCollectionPopulator
|
||||
|
||||
def _build_pair(self, history_id, contents):
|
||||
|
||||
@@ -5,11 +5,14 @@ order to test something that cannot be tested with the default functional/api
|
||||
testing configuration.
|
||||
"""
|
||||
import os
|
||||
from typing import ClassVar
|
||||
from typing import (
|
||||
ClassVar,
|
||||
Optional,
|
||||
TYPE_CHECKING,
|
||||
)
|
||||
from unittest import (
|
||||
skip,
|
||||
SkipTest,
|
||||
TestCase,
|
||||
)
|
||||
|
||||
import pytest
|
||||
@@ -17,12 +20,16 @@ import pytest
|
||||
from galaxy.app import UniverseApplication
|
||||
from galaxy.tool_util.verify.test_data import TestDataResolver
|
||||
from galaxy.util.commands import which
|
||||
from galaxy.util.unittest import TestCase
|
||||
from galaxy_test.base.api import (
|
||||
UsesApiTestCaseMixin,
|
||||
UsesCeleryTasks,
|
||||
)
|
||||
from .driver_util import GalaxyTestDriver
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy_test.base.populators import BaseDatasetPopulator
|
||||
|
||||
NO_APP_MESSAGE = "test_case._app called though no Galaxy has been configured."
|
||||
# Following should be for Homebrew Rabbitmq and Docker on Mac "amqp://guest:guest@localhost:5672//"
|
||||
AMQP_URL = os.environ.get("GALAXY_TEST_AMQP_URL", None)
|
||||
@@ -97,6 +104,8 @@ class IntegrationInstance(UsesApiTestCaseMixin, UsesCeleryTasks):
|
||||
# config directory and such.
|
||||
isolate_galaxy_config = True
|
||||
|
||||
dataset_populator: Optional["BaseDatasetPopulator"]
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Configure and start Galaxy for a test."""
|
||||
@@ -171,6 +180,12 @@ class IntegrationInstance(UsesApiTestCaseMixin, UsesCeleryTasks):
|
||||
# realpath here to get around problems with symlinks being blocked.
|
||||
return os.path.realpath(os.path.join(cls._test_driver.galaxy_test_tmp_dir, name))
|
||||
|
||||
@pytest.fixture
|
||||
def history_id(self):
|
||||
assert self.dataset_populator
|
||||
with self.dataset_populator.test_history() as history_id:
|
||||
yield history_id
|
||||
|
||||
|
||||
class IntegrationTestCase(IntegrationInstance, TestCase):
|
||||
"""Unit TestCase with utilities for spinning up Galaxy."""
|
||||
|
||||
@@ -225,7 +225,7 @@ class GalaxyTestSeleniumContext(GalaxySeleniumContext):
|
||||
"""Extend GalaxySeleniumContext with Selenium-aware galaxy_test.base.populators."""
|
||||
|
||||
@property
|
||||
def dataset_populator(self) -> populators.BaseDatasetPopulator:
|
||||
def dataset_populator(self) -> "SeleniumSessionDatasetPopulator":
|
||||
"""A dataset populator connected to the Galaxy session described by Selenium context."""
|
||||
return SeleniumSessionDatasetPopulator(self)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
You may run this test using the following command:
|
||||
./run_tests.sh test/integration/cloudauthz/test_cloudauthz.py:DefineCloudAuthzTestCase.test_post_cloudauthz_without_authn -s
|
||||
./run_tests.sh test/integration/cloudauthz/test_cloudauthz.py:TestDefineCloudAuthz.test_post_cloudauthz_without_authn -s
|
||||
"""
|
||||
|
||||
import json
|
||||
@@ -8,7 +8,7 @@ import json
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class DefineCloudAuthzTestCase(integration_util.IntegrationTestCase):
|
||||
class TestDefineCloudAuthz(integration_util.IntegrationTestCase):
|
||||
framework_tool_and_types = True
|
||||
|
||||
def test_post_cloudauthz_without_authn(self):
|
||||
|
||||
@@ -51,6 +51,7 @@ def stop_minio(container_name):
|
||||
|
||||
class BaseObjectStoreIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -39,7 +39,7 @@ DISTRIBUTED_OBJECT_STORE_CONFIG_TEMPLATE = string.Template(
|
||||
TEST_INPUT_FILES_CONTENT = "1 2 3"
|
||||
|
||||
|
||||
class ObjectStoreJobsIntegrationTestCase(BaseObjectStoreIntegrationTestCase):
|
||||
class TestObjectStoreJobsIntegration(BaseObjectStoreIntegrationTestCase):
|
||||
# setup by _configure_object_store
|
||||
files1_path: str
|
||||
files2_path: str
|
||||
|
||||
@@ -32,7 +32,7 @@ DISTRIBUTED_OBJECT_STORE_CONFIG_TEMPLATE = string.Template(
|
||||
TEST_INPUT_FILES_CONTENT = "1 2 3"
|
||||
|
||||
|
||||
class MixedStoreByObjectStoreIntegrationTestCase(BaseObjectStoreIntegrationTestCase):
|
||||
class TestMixedStoreByObjectStoreIntegration(BaseObjectStoreIntegrationTestCase):
|
||||
# setup by _configure_object_store
|
||||
files1_path: str
|
||||
files2_path: str
|
||||
|
||||
@@ -9,7 +9,7 @@ from ._base import (
|
||||
)
|
||||
|
||||
|
||||
class CacheOperationTestCase(BaseSwiftObjectStoreIntegrationTestCase):
|
||||
class TestCacheOperation(BaseSwiftObjectStoreIntegrationTestCase):
|
||||
def tearDown(self):
|
||||
shutil.rmtree(self.object_store_cache_path)
|
||||
os.mkdir(self.object_store_cache_path)
|
||||
|
||||
@@ -48,7 +48,7 @@ DISTRIBUTED_OBJECT_STORE_CONFIG_TEMPLATE = string.Template(
|
||||
)
|
||||
|
||||
|
||||
class ObjectStoreSelectionIntegrationTestCase(BaseObjectStoreIntegrationTestCase):
|
||||
class TestObjectStoreSelectionIntegration(BaseObjectStoreIntegrationTestCase):
|
||||
# populated by config_object_store
|
||||
files_default_path: str
|
||||
files_static_path: str
|
||||
|
||||
@@ -27,9 +27,9 @@ TEST_TOOL_IDS = [
|
||||
]
|
||||
|
||||
|
||||
class SwiftObjectStoreIntegrationTestCase(BaseSwiftObjectStoreIntegrationTestCase):
|
||||
class TestSwiftObjectStoreIntegration(BaseSwiftObjectStoreIntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
instance = integration_util.integration_module_instance(SwiftObjectStoreIntegrationTestCase)
|
||||
instance = integration_util.integration_module_instance(TestSwiftObjectStoreIntegration)
|
||||
test_tools = integration_util.integration_tool_runner(TEST_TOOL_IDS)
|
||||
|
||||
@@ -4,18 +4,18 @@ from io import BytesIO
|
||||
from galaxy_test.base.populators import (
|
||||
DatasetCollectionPopulator,
|
||||
DatasetPopulator,
|
||||
uses_test_history,
|
||||
)
|
||||
from galaxy_test.driver.integration_util import IntegrationTestCase
|
||||
|
||||
|
||||
class AsyncDownloadsIntegrationTestCase(IntegrationTestCase):
|
||||
class TestAsyncDownloadsIntegration(IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
self.dataset_collection_populator = DatasetCollectionPopulator(self.galaxy_interactor)
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_async_collection_download(self, history_id):
|
||||
fetch_response = self.dataset_collection_populator.create_list_in_history(history_id, direct_upload=True).json()
|
||||
dataset_collection = self.dataset_collection_populator.wait_for_fetched_collection(fetch_response)
|
||||
|
||||
@@ -30,7 +30,9 @@ def process_page(request: CreatePagePayload):
|
||||
return f"content_format is {request.content_format} with annotation {request.annotation}"
|
||||
|
||||
|
||||
class CeleryTasksIntegrationTestCase(IntegrationTestCase):
|
||||
class TestCeleryTasksIntegration(IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -10,7 +10,7 @@ SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
|
||||
CHAINED_DYNDESTS_JOB_CONFIG = os.path.join(SCRIPT_DIRECTORY, "chained_dyndest_job_conf.xml")
|
||||
|
||||
|
||||
class ChainedDynamicDestinationIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestChainedDynamicDestinationIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from galaxy_test.api.test_workflows import ChangeDatatypeTestCase
|
||||
from galaxy_test.api import test_workflows
|
||||
from galaxy_test.base.populators import (
|
||||
DatasetPopulator,
|
||||
WorkflowPopulator,
|
||||
@@ -6,9 +6,12 @@ from galaxy_test.base.populators import (
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class ChangeDatatypeStoreByIdIntegrationTestCase(integration_util.IntegrationTestCase, ChangeDatatypeTestCase):
|
||||
class TestChangeDatatypeStoreByIdIntegration(
|
||||
integration_util.IntegrationTestCase, test_workflows.ChangeDatatypeTestCase
|
||||
):
|
||||
"""Test changing datatype with object_store_store_by: id."""
|
||||
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -153,17 +153,17 @@ class SecureShell:
|
||||
shell_plugin = "SecureShell"
|
||||
|
||||
|
||||
class ParamikoCliSlurmIntegrationTestCase(SlurmSetup, ParamikoShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
class TestParamikoCliSlurmIntegration(SlurmSetup, ParamikoShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
class ShellJobCliSlurmIntegrationTestCase(SlurmSetup, SecureShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
class TestShellJobCliSlurmIntegration(SlurmSetup, SecureShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
class ParamikoCliOpenPBSIntegrationTestCase(OpenPBSSetup, ParamikoShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
class TestParamikoCliOpenPBSIntegration(OpenPBSSetup, ParamikoShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
class ShellJobCliOpenPBSIntegrationTestCase(OpenPBSSetup, SecureShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
class TestShellJobCliOpenPBSIntegration(OpenPBSSetup, SecureShell, AbstractTestCases.BaseCliIntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -12,7 +12,7 @@ class _BaseUserExposeIntegerationTestCase(integration_util.IntegrationTestCase):
|
||||
return users
|
||||
|
||||
|
||||
class DefaultUserExposeIntegrationTestCase(_BaseUserExposeIntegerationTestCase):
|
||||
class TestDefaultUserExposeIntegration(_BaseUserExposeIntegerationTestCase):
|
||||
def test_defaults(self):
|
||||
original_user_ids = self.original_user_ids()
|
||||
self.galaxy_interactor.ensure_user_with_email("defaultuserexposetest@galaxyproject.org")
|
||||
@@ -22,7 +22,7 @@ class DefaultUserExposeIntegrationTestCase(_BaseUserExposeIntegerationTestCase):
|
||||
assert len(new_users) == 0
|
||||
|
||||
|
||||
class EmailUserExposeIntegrationTestCase(_BaseUserExposeIntegerationTestCase):
|
||||
class TestEmailUserExposeIntegration(_BaseUserExposeIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -39,7 +39,7 @@ class EmailUserExposeIntegrationTestCase(_BaseUserExposeIntegerationTestCase):
|
||||
assert "last_password_change" not in user
|
||||
|
||||
|
||||
class UsernameUserExposeIntegrationTestCase(_BaseUserExposeIntegerationTestCase):
|
||||
class TestUsernameUserExposeIntegration(_BaseUserExposeIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class ConfigSchemaTestCase(integration_util.IntegrationTestCase):
|
||||
class TestConfigSchema(integration_util.IntegrationTestCase):
|
||||
def test_schema_path_resolution_graph(self):
|
||||
# Run schema's validation method; throws error if schema invalid
|
||||
schema = self._app.config.schema
|
||||
|
||||
@@ -2,7 +2,7 @@ from galaxy_test.base.populators import LibraryPopulator
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class ConfigurationDecodeIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestConfigurationDecodeIntegration(integration_util.IntegrationTestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.library_populator = LibraryPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -60,7 +60,7 @@ def skip_if_container_type_unavailable(cls):
|
||||
raise unittest.SkipTest(f"Executable '{cls.container_type}' not found on PATH")
|
||||
|
||||
|
||||
class DockerizedJobsIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, MulledJobTestCases):
|
||||
class TestDockerizedJobsIntegration(BaseJobEnvironmentIntegrationTestCase, MulledJobTestCases):
|
||||
|
||||
job_config_file = DOCKERIZED_JOB_CONFIG_FILE
|
||||
build_mulled_resolver = "build_mulled"
|
||||
@@ -152,7 +152,7 @@ class DockerizedJobsIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, M
|
||||
assert status[0]["container_description"]["identifier"].startswith("quay.io/local/mulled-v2-")
|
||||
|
||||
|
||||
class MappingContainerResolverTestCase(integration_util.IntegrationTestCase):
|
||||
class TestMappingContainerResolver(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
container_type = "docker"
|
||||
@@ -195,7 +195,7 @@ class MappingContainerResolverTestCase(integration_util.IntegrationTestCase):
|
||||
assert "0.7.15-r1140" in output
|
||||
|
||||
|
||||
class InlineContainerConfigurationTestCase(MappingContainerResolverTestCase):
|
||||
class TestInlineContainerConfiguration(TestMappingContainerResolver):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -218,7 +218,7 @@ class InlineContainerConfigurationTestCase(MappingContainerResolverTestCase):
|
||||
config["container_resolvers"] = container_resolvers_config
|
||||
|
||||
|
||||
class InlineJobEnvironmentContainerResolverTestCase(integration_util.IntegrationTestCase):
|
||||
class TestInlineJobEnvironmentContainerResolver(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
container_type = "docker"
|
||||
@@ -251,8 +251,8 @@ class InlineJobEnvironmentContainerResolverTestCase(integration_util.Integration
|
||||
# Singularity 2.4 in the official Vagrant issue has some problems running this test
|
||||
# case by default because subdirectories of /tmp don't bind correctly. Overridding
|
||||
# TMPDIR can fix this.
|
||||
# TMPDIR=/home/vagrant/tmp/ pytest test/integration/test_containerized_jobs.py::SingularityJobsIntegrationTestCase
|
||||
class SingularityJobsIntegrationTestCase(DockerizedJobsIntegrationTestCase):
|
||||
# TMPDIR=/home/vagrant/tmp/ pytest test/integration/test_containerized_jobs.py::TestSingularityJobsIntegration
|
||||
class TestSingularityJobsIntegration(TestDockerizedJobsIntegration):
|
||||
|
||||
job_config_file = SINGULARITY_JOB_CONFIG_FILE
|
||||
build_mulled_resolver = "build_mulled_singularity"
|
||||
|
||||
@@ -41,7 +41,7 @@ DATA_MANAGER_MANUAL_INPUT = {
|
||||
}
|
||||
|
||||
|
||||
class DataManagerIntegrationTestCase(integration_util.IntegrationTestCase, UsesShed):
|
||||
class TestDataManagerIntegration(integration_util.IntegrationTestCase, UsesShed):
|
||||
|
||||
"""Test data manager installation and table reload through the API"""
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
|
||||
REFGENIE_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "refgenie.yml")
|
||||
|
||||
|
||||
class DataManagerIntegrationTestCase(integration_util.IntegrationTestCase, UsesShed):
|
||||
class TestDataManagerIntegration(integration_util.IntegrationTestCase, UsesShed):
|
||||
|
||||
"""Test data manager installation and table reload through the API"""
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
|
||||
MOCK_BIOTOOLS_CONTENT = os.path.join(SCRIPT_DIRECTORY, "mock_biotools_content")
|
||||
|
||||
|
||||
class DynamicEdamLoadingIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestDynamicEdamLoadingIntegration(integration_util.IntegrationTestCase):
|
||||
"""Test mapping over tools with extended metadata enabled."""
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class EdamToolboxIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestEdamToolboxIntegration(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -31,7 +31,7 @@ class EdamToolboxIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
assert edam_panel_view["view_type"] == "ontology"
|
||||
|
||||
|
||||
class EdamToolboxDefaultIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestEdamToolboxDefaultIntegration(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ TEST_TOOL_IDS = [
|
||||
]
|
||||
|
||||
|
||||
class ExtendedMetadataIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestExtendedMetadataIntegration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
@@ -91,7 +93,9 @@ class ExtendedMetadataIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
assert dataset["created_from_basename"] == "4.bed"
|
||||
|
||||
|
||||
class ExtendedMetadataDeferredIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestExtendedMetadataDeferredIntegration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -2,14 +2,14 @@ from galaxy_test.api.test_tools import TestsTools
|
||||
from galaxy_test.base.populators import (
|
||||
DatasetCollectionPopulator,
|
||||
DatasetPopulator,
|
||||
uses_test_history,
|
||||
)
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class ExtendedMetadataMappingIntegrationTestCase(integration_util.IntegrationTestCase, TestsTools):
|
||||
class TestExtendedMetadataMappingIntegration(integration_util.IntegrationTestCase, TestsTools):
|
||||
"""Test mapping over tools with extended metadata enabled."""
|
||||
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
@classmethod
|
||||
@@ -23,7 +23,6 @@ class ExtendedMetadataMappingIntegrationTestCase(integration_util.IntegrationTes
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
self.dataset_collection_populator = DatasetCollectionPopulator(self.galaxy_interactor)
|
||||
|
||||
@uses_test_history()
|
||||
def test_map_over_collection(self, history_id):
|
||||
hdca_id = self._build_pair(history_id, ["123", "456"])
|
||||
inputs = {
|
||||
|
||||
@@ -7,8 +7,8 @@ from galaxy_test.base.populators import (
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class FailJobWhenToolUnavailableTestCase(integration_util.IntegrationTestCase):
|
||||
|
||||
class TestFailJobWhenToolUnavailable(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
require_admin_user = True
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -4,7 +4,7 @@ from datetime import datetime
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class FluentMetricsIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestFluentMetricsIntegration(integration_util.IntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -5,7 +5,7 @@ from packaging.version import Version
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class GalaxyInteractorTestCase(integration_util.IntegrationTestCase):
|
||||
class TestGalaxyInteractor(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def get_key(has_len_file=True):
|
||||
return BUILDS_DATA[pos].split("\t")[0]
|
||||
|
||||
|
||||
class GenomesTestCase(integration_util.IntegrationTestCase):
|
||||
class TestGenomes(integration_util.IntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -46,7 +46,7 @@ class BaseHandlerAssignmentMethodIntegrationTestCase(integration_util.Integratio
|
||||
config["tool_dependency_dir"] = "none"
|
||||
|
||||
|
||||
class DBPreassignHandlerAssignmentMethodIntegrationTestCase(BaseHandlerAssignmentMethodIntegrationTestCase):
|
||||
class TestDBPreassignHandlerAssignmentMethodIntegration(BaseHandlerAssignmentMethodIntegrationTestCase):
|
||||
def setUp(self):
|
||||
self._with_handlers_config(assign_with="db-preassign", handlers=[{"id": "main"}])
|
||||
super().setUp()
|
||||
@@ -56,7 +56,7 @@ class DBPreassignHandlerAssignmentMethodIntegrationTestCase(BaseHandlerAssignmen
|
||||
self._run_tool_test(tool_id)
|
||||
|
||||
|
||||
class DBTransactionIsolationHandlerAssignmentMethodIntegrationTestCase(BaseHandlerAssignmentMethodIntegrationTestCase):
|
||||
class TestDBTransactionIsolationHandlerAssignmentMethodIntegration(BaseHandlerAssignmentMethodIntegrationTestCase):
|
||||
def setUp(self):
|
||||
self._with_handlers_config(assign_with="db-transaction-isolation", handlers=[{"id": "main"}])
|
||||
super().setUp()
|
||||
@@ -67,7 +67,7 @@ class DBTransactionIsolationHandlerAssignmentMethodIntegrationTestCase(BaseHandl
|
||||
self._run_tool_test(tool_id)
|
||||
|
||||
|
||||
class DBSkipLockedHandlerAssignmentMethodIntegrationTestCase(BaseHandlerAssignmentMethodIntegrationTestCase):
|
||||
class TestDBSkipLockedHandlerAssignmentMethodIntegration(BaseHandlerAssignmentMethodIntegrationTestCase):
|
||||
def setUp(self):
|
||||
self._with_handlers_config(assign_with="db-skip-locked", handlers=[{"id": "main"}])
|
||||
super().setUp()
|
||||
|
||||
@@ -15,7 +15,7 @@ from galaxy_test.base.populators import (
|
||||
from galaxy_test.driver.integration_util import IntegrationTestCase
|
||||
|
||||
|
||||
class ImportExportHistoryOutputsToWorkingDirIntegrationTestCase(ImportExportTests, IntegrationTestCase):
|
||||
class TestImportExportHistoryOutputsToWorkingDirIntegration(ImportExportTests, IntegrationTestCase):
|
||||
task_based = False
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -29,7 +29,7 @@ class ImportExportHistoryOutputsToWorkingDirIntegrationTestCase(ImportExportTest
|
||||
self._set_up_populators()
|
||||
|
||||
|
||||
class ImportExportHistoryViaTasksIntegrationTestCase(ImportExportTests, IntegrationTestCase, UsesCeleryTasks):
|
||||
class TestImportExportHistoryViaTasksIntegration(ImportExportTests, IntegrationTestCase, UsesCeleryTasks):
|
||||
task_based = True
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -49,7 +49,8 @@ class ImportExportHistoryViaTasksIntegrationTestCase(ImportExportTests, Integrat
|
||||
)
|
||||
|
||||
|
||||
class ImportExportHistoryContentsViaTasksIntegrationTestCase(IntegrationTestCase, UsesCeleryTasks):
|
||||
class TestImportExportHistoryContentsViaTasksIntegration(IntegrationTestCase, UsesCeleryTasks):
|
||||
dataset_populator: DatasetPopulator
|
||||
task_based = True
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -135,11 +135,11 @@ class RunsInterativeToolTests:
|
||||
assert not it_output_details["deleted"]
|
||||
|
||||
|
||||
class InteractiveToolsIntegrationTestCase(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
class TestInteractiveToolsIntegration(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
pass
|
||||
|
||||
|
||||
class InteractiveToolsPulsarIntegrationTestCase(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
class TestInteractiveToolsPulsarIntegration(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
config["job_config_file"] = EMBEDDED_PULSAR_JOB_CONFIG_FILE_DOCKER
|
||||
@@ -147,13 +147,13 @@ class InteractiveToolsPulsarIntegrationTestCase(BaseInteractiveToolsIntegrationT
|
||||
disable_dependency_resolution(config)
|
||||
|
||||
|
||||
class InteractiveToolsRemoteProxyIntegrationTestCase(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
class TestInteractiveToolsRemoteProxyIntegration(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
"""
|
||||
$ cd gx-it-proxy
|
||||
$ ./lib/createdb.js --sessions $HOME/gxitexproxy.sqlite
|
||||
$ ./lib/main.js --port 9001 --ip 0.0.0.0 --verbose --sessions $HOME/gxitexproxy.sqlite
|
||||
$ # Need to create new DB for each test I think, duplicate IDs are the problem I think because each test starts at 1
|
||||
$ GALAXY_TEST_EXTERNAL_PROXY_HOST="localhost:9001" GALAXY_TEST_EXTERNAL_PROXY_MAP="$HOME/gxitexproxy.sqlite" pytest -s test/integration/test_interactivetools_api.py::InteractiveToolsRemoteProxyIntegrationTestCase
|
||||
$ GALAXY_TEST_EXTERNAL_PROXY_HOST="localhost:9001" GALAXY_TEST_EXTERNAL_PROXY_MAP="$HOME/gxitexproxy.sqlite" pytest -s test/integration/test_interactivetools_api.py::TestInteractiveToolsRemoteProxyIntegration
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
@@ -173,9 +173,7 @@ class InteractiveToolsRemoteProxyIntegrationTestCase(BaseInteractiveToolsIntegra
|
||||
@integration_util.skip_unless_kubernetes()
|
||||
@integration_util.skip_unless_amqp()
|
||||
@integration_util.skip_if_github_workflow()
|
||||
class KubeInteractiveToolsRemoteProxyIntegrationTestCase(
|
||||
BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests
|
||||
):
|
||||
class TestKubeInteractiveToolsRemoteProxyIntegration(BaseInteractiveToolsIntegrationTestCase, RunsInterativeToolTests):
|
||||
"""
|
||||
$ git clone https://github.com/galaxyproject/gx-it-proxy.git $HOME/gx-it-proxy
|
||||
$ cd $HOME/gx-it-proxy/docker/k8s
|
||||
@@ -187,7 +185,7 @@ class KubeInteractiveToolsRemoteProxyIntegrationTestCase(
|
||||
$ ./lib/createdb.js --sessions $HOME/gxitk8proxy.sqlite
|
||||
$ ./lib/main.js --port 9002 --ip 0.0.0.0 --verbose --sessions $HOME/gxitk8proxy.sqlite --forwardIP localhost --forwardPort 8910 &
|
||||
$ cd back/to/galaxy
|
||||
$ GALAXY_TEST_K8S_EXTERNAL_PROXY_HOST="localhost:9002" GALAXY_TEST_K8S_EXTERNAL_PROXY_MAP="$HOME/gxitk8proxy.sqlite" pytest -s test/integration/test_interactivetools_api.py::KubeInteractiveToolsRemoteProxyIntegrationTestCase
|
||||
$ GALAXY_TEST_K8S_EXTERNAL_PROXY_HOST="localhost:9002" GALAXY_TEST_K8S_EXTERNAL_PROXY_MAP="$HOME/gxitk8proxy.sqlite" pytest -s test/integration/test_interactivetools_api.py::TestKubeInteractiveToolsRemoteProxyIntegration
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -66,7 +66,7 @@ class BaseJobEnvironmentIntegrationTestCase(integration_util.IntegrationTestCase
|
||||
"""Extension point that lets subclasses investigate the completed job."""
|
||||
|
||||
|
||||
class DefaultJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestDefaultJobEnvironmentIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -119,7 +119,7 @@ class DefaultJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTest
|
||||
assert job_env.home == os.path.join(job_directory, "home"), job_env.home
|
||||
|
||||
|
||||
class EmbeddedPulsarDefaultJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestEmbeddedPulsarDefaultJobEnvironmentIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -149,7 +149,7 @@ class EmbeddedPulsarDefaultJobEnvironmentIntegrationTestCase(BaseJobEnvironmentI
|
||||
assert not job_env.tmp.startswith(job_directory)
|
||||
|
||||
|
||||
class TmpDirToTrueJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestTmpDirToTrueJobEnvironmentIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -167,7 +167,7 @@ class TmpDirToTrueJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegratio
|
||||
assert job_env.tmp.startswith(job_directory), job_env
|
||||
|
||||
|
||||
class TmpDirAsShellCommandJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestTmpDirAsShellCommandJobEnvironmentIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -185,7 +185,7 @@ class TmpDirAsShellCommandJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIn
|
||||
assert basename.startswith("cooltmp"), job_env.tmp
|
||||
|
||||
|
||||
class SharedHomeJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestSharedHomeJobEnvironmentIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -222,7 +222,7 @@ class SharedHomeJobEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationT
|
||||
assert job_env.home == os.path.join(job_directory, "home"), job_env.home
|
||||
|
||||
|
||||
class JobIOEnvironmentIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase):
|
||||
class TestJobIOEnvironmentIntegration(BaseJobEnvironmentIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -32,7 +32,7 @@ TEST_INPUT_TEXT = "test input content\n"
|
||||
TEST_FILE_IO = io.StringIO("some initial text data")
|
||||
|
||||
|
||||
class JobFilesIntegerationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestJobFilesIntegeration(integration_util.IntegrationTestCase):
|
||||
initialized = False
|
||||
|
||||
@classmethod
|
||||
@@ -46,14 +46,14 @@ class JobFilesIntegerationTestCase(integration_util.IntegrationTestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
if not JobFilesIntegerationTestCase.initialized:
|
||||
if not TestJobFilesIntegeration.initialized:
|
||||
history_id = self.dataset_populator.new_history()
|
||||
sa_session = self.sa_session
|
||||
assert len(sa_session.query(model.HistoryDatasetAssociation).all()) == 0
|
||||
self.dataset_populator.new_dataset(history_id, content=TEST_INPUT_TEXT, wait=True)
|
||||
assert len(sa_session.query(model.HistoryDatasetAssociation).all()) == 1
|
||||
self.input_hda = sa_session.query(model.HistoryDatasetAssociation).all()[0]
|
||||
JobFilesIntegerationTestCase.initialized = True
|
||||
TestJobFilesIntegeration.initialized = True
|
||||
|
||||
def test_read_by_state(self):
|
||||
job, _, _ = self.create_static_job_with_state("running")
|
||||
|
||||
@@ -10,7 +10,8 @@ DELAY_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "delay_job_conf.yml")
|
||||
SIMPLE_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "simple_job_conf.xml")
|
||||
|
||||
|
||||
class JobRecoveryBeforeHandledIntegerationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestJobRecoveryBeforeHandledIntegeration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
def setUp(self):
|
||||
@@ -39,7 +40,8 @@ class JobRecoveryBeforeHandledIntegerationTestCase(integration_util.IntegrationT
|
||||
self.dataset_populator.wait_for_history(history_id, assert_ok=True)
|
||||
|
||||
|
||||
class JobRecoveryAfterHandledIntegerationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestJobRecoveryAfterHandledIntegeration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -42,7 +42,7 @@ class _BaseResubmissionIntegerationTestCase(integration_util.IntegrationTestCase
|
||||
assert exception_thrown
|
||||
|
||||
|
||||
class JobResubmissionIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -175,7 +175,7 @@ class JobResubmissionIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
)
|
||||
|
||||
|
||||
class JobResubmissionDefaultIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionDefaultIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -190,7 +190,7 @@ class JobResubmissionDefaultIntegrationTestCase(_BaseResubmissionIntegerationTes
|
||||
self._assert_job_passes(resource_parameters={"test_name": "test_default_resubmission"})
|
||||
|
||||
|
||||
class JobResubmissionDynamicIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionDynamicIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
@@ -204,7 +204,7 @@ class JobResubmissionDynamicIntegrationTestCase(_BaseResubmissionIntegerationTes
|
||||
|
||||
|
||||
# Verify the test tool fails if only a small amount of memory is allocated.
|
||||
class JobResubmissionSmallMemoryIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionSmallMemoryIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -216,7 +216,7 @@ class JobResubmissionSmallMemoryIntegrationTestCase(_BaseResubmissionIntegeratio
|
||||
|
||||
# Verify the test tool will resubmit on failure tested above and will then pass with
|
||||
# proper resubmission condition.
|
||||
class JobResubmissionSmallMemoryResubmitsToLargeIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionSmallMemoryResubmitsToLargeIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -227,7 +227,7 @@ class JobResubmissionSmallMemoryResubmitsToLargeIntegrationTestCase(_BaseResubmi
|
||||
|
||||
|
||||
# Verify the test tool fails with an exit code issue.
|
||||
class JobResubmissionToolDetectedErrorIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionToolDetectedErrorIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -239,7 +239,7 @@ class JobResubmissionToolDetectedErrorIntegrationTestCase(_BaseResubmissionInteg
|
||||
|
||||
# Verify the test tool will resubmit on failure tested above and will then pass in
|
||||
# an environment without a tool indicated error.
|
||||
class JobResubmissionToolDetectedErrorResubmitsIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionToolDetectedErrorResubmitsIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -250,7 +250,7 @@ class JobResubmissionToolDetectedErrorResubmitsIntegrationTestCase(_BaseResubmis
|
||||
|
||||
|
||||
# Verify that a failure to connect to pulsar can trigger a resubmit
|
||||
class JobResubmissionPulsarIntegrationTestCase(_BaseResubmissionIntegerationTestCase):
|
||||
class TestJobResubmissionPulsarIntegration(_BaseResubmissionIntegerationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -176,7 +176,7 @@ class KubernetesDatasetPopulator(DatasetPopulator):
|
||||
|
||||
|
||||
@integration_util.skip_unless_kubernetes()
|
||||
class BaseKubernetesIntegrationTestCase(BaseJobEnvironmentIntegrationTestCase, MulledJobTestCases):
|
||||
class TestKubernetesIntegration(BaseJobEnvironmentIntegrationTestCase, MulledJobTestCases):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = KubernetesDatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -124,7 +124,7 @@ def job_config(template_str, jobs_directory):
|
||||
@integration_util.skip_unless_kubernetes()
|
||||
@integration_util.skip_unless_amqp()
|
||||
@integration_util.skip_if_github_workflow()
|
||||
class BaseKubernetesStagingTest(BaseJobEnvironmentIntegrationTestCase, MulledJobTestCases):
|
||||
class TestKubernetesStaging(BaseJobEnvironmentIntegrationTestCase, MulledJobTestCases):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = KubernetesDatasetPopulator(self.galaxy_interactor)
|
||||
@@ -137,7 +137,7 @@ class BaseKubernetesStagingTest(BaseJobEnvironmentIntegrationTestCase, MulledJob
|
||||
super().setUpClass()
|
||||
|
||||
|
||||
class KubernetesStagingContainerIntegrationTestCase(CancelsJob, BaseKubernetesStagingTest):
|
||||
class TestKubernetesStagingContainerIntegration(CancelsJob, TestKubernetesStaging):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
config["jobs_directory"] = cls.jobs_directory
|
||||
@@ -189,7 +189,7 @@ class KubernetesStagingContainerIntegrationTestCase(CancelsJob, BaseKubernetesSt
|
||||
return active
|
||||
|
||||
|
||||
class KubernetesDependencyResolutionIntegrationTestCase(BaseKubernetesStagingTest):
|
||||
class TestKubernetesDependencyResolutionIntegration(TestKubernetesStaging):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
config["jobs_directory"] = cls.jobs_directory
|
||||
|
||||
@@ -31,7 +31,7 @@ class CancelsJob:
|
||||
)
|
||||
|
||||
|
||||
class LocalJobCancellationTestCase(CancelsJob, integration_util.IntegrationTestCase):
|
||||
class TestLocalJobCancellation(CancelsJob, integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ from galaxy_test.base.api import UsesCeleryTasks
|
||||
from galaxy_test.base.populators import (
|
||||
DatasetPopulator,
|
||||
LibraryPopulator,
|
||||
uses_test_history,
|
||||
)
|
||||
from galaxy_test.driver.integration_util import IntegrationTestCase
|
||||
|
||||
|
||||
class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, UsesCeleryTasks):
|
||||
class TestMaterializeDatasetInstanceTasaksIntegration(IntegrationTestCase, UsesCeleryTasks):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -34,7 +35,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
self.library_populator = LibraryPopulator(self.galaxy_interactor)
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_materialize_history_dataset(self, history_id: str):
|
||||
as_list = self.dataset_populator.create_contents_from_store(
|
||||
history_id,
|
||||
@@ -54,7 +54,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
assert new_hda_details["state"] == "ok"
|
||||
assert not new_hda_details["deleted"]
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_materialize_gxfiles_uri(self, history_id: str):
|
||||
as_list = self.dataset_populator.create_contents_from_store(
|
||||
history_id,
|
||||
@@ -75,7 +74,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
assert new_hda_details["state"] == "ok"
|
||||
assert not new_hda_details["deleted"]
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_materialize_history_dataset_bam(self, history_id: str):
|
||||
as_list = self.dataset_populator.create_contents_from_store(
|
||||
history_id,
|
||||
@@ -107,7 +105,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
assert ">chrM" in new_hda_details["metadata_reference_names"]
|
||||
assert "metadata_bam_index" in new_hda_details
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_materialize_library_dataset(self, history_id: str):
|
||||
response = self.library_populator.create_from_store(store_dict=one_ld_library_deferred_model_store_dict())
|
||||
assert isinstance(response, list)
|
||||
@@ -126,7 +123,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
assert new_hda_details["state"] == "ok"
|
||||
assert not new_hda_details["deleted"]
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_upload_vs_materialize_simplest_upload(self, history_id: str):
|
||||
item = {"src": "url", "url": "gxfiles://testdatafiles//simple_line_no_newline.txt", "ext": "txt"}
|
||||
output = self.dataset_populator.fetch_hda(history_id, item)
|
||||
@@ -141,7 +137,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
content = self.dataset_populator.get_history_dataset_content(new_history_id, hid=2, assert_ok=False)
|
||||
assert content == "This is a line of text."
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_upload_vs_materialize_to_posix_lines(self, history_id: str):
|
||||
item = {
|
||||
"src": "url",
|
||||
@@ -167,7 +162,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
content = self.dataset_populator.get_history_dataset_content(new_history_id, hid=2, assert_ok=False)
|
||||
assert content == "This is a line of text.\n"
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_upload_vs_materialize_space_to_tab(self, history_id: str):
|
||||
item = {
|
||||
"src": "url",
|
||||
@@ -193,7 +187,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
content = self.dataset_populator.get_history_dataset_content(new_history_id, hid=2, assert_ok=False)
|
||||
assert content == "This\tis\ta\tline\tof\ttext."
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_upload_vs_materialize_to_posix_and_space_to_tab(self, history_id: str):
|
||||
item = {
|
||||
"src": "url",
|
||||
@@ -220,7 +213,6 @@ class MaterializeDatasetInstanceTasaksIntegrationTestCase(IntegrationTestCase, U
|
||||
content = self.dataset_populator.get_history_dataset_content(new_history_id, hid=2, assert_ok=False)
|
||||
assert content == "This\tis\ta\tline\tof\ttext.\n"
|
||||
|
||||
@uses_test_history(require_new=True)
|
||||
def test_upload_vs_materialize_grooming(self, history_id: str):
|
||||
item = {
|
||||
"src": "url",
|
||||
|
||||
@@ -3,9 +3,10 @@ from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class MaxDiscoveredFilesTestCase(integration_util.IntegrationTestCase):
|
||||
class TestMaxDiscoveredFiles(integration_util.IntegrationTestCase):
|
||||
"""Describe a Galaxy test instance with embedded pulsar configured."""
|
||||
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
max_discovered_files = 9
|
||||
|
||||
@@ -33,7 +34,7 @@ class MaxDiscoveredFilesTestCase(integration_util.IntegrationTestCase):
|
||||
)
|
||||
|
||||
|
||||
class ExtendedMetadataMaxDiscoveredFilesTestCase(MaxDiscoveredFilesTestCase):
|
||||
class TestExtendedMetadataMaxDiscoveredFiles(TestMaxDiscoveredFiles):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
config["max_discovered_files"] = cls.max_discovered_files
|
||||
|
||||
@@ -11,8 +11,9 @@ from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.driver.integration_util import IntegrationTestCase
|
||||
|
||||
|
||||
class ModelStoreScriptsIntegrationTestCase(IntegrationTestCase):
|
||||
class TestModelStoreScriptsIntegration(IntegrationTestCase):
|
||||
# TODO: test build_objects also...
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
@@ -11,7 +11,9 @@ from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class PageJsonEncodingIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestPageJsonEncodingIntegration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -6,7 +6,7 @@ THIS_DIR = os.path.dirname(__file__)
|
||||
PANEL_VIEWS_DIR_1 = os.path.join(THIS_DIR, "panel_views_1")
|
||||
|
||||
|
||||
class PanelViewsFromDirectoryIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestPanelViewsFromDirectoryIntegration(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
allow_tool_conf_override = False
|
||||
@@ -112,7 +112,7 @@ class PanelViewsFromDirectoryIntegrationTestCase(integration_util.IntegrationTes
|
||||
assert len(tools) == 2, len(tools)
|
||||
|
||||
|
||||
class PanelViewsFromConfigIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestPanelViewsFromConfigIntegration(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -35,19 +35,19 @@ class BaseEmbeddedPulsarContainerIntegrationTestCase(integration_util.Integratio
|
||||
super().setUpClass()
|
||||
|
||||
|
||||
class EmbeddedSingularityPulsarIntegrationTestCase(BaseEmbeddedPulsarContainerIntegrationTestCase, MulledJobTestCases):
|
||||
class TestEmbeddedSingularityPulsarIntegration(BaseEmbeddedPulsarContainerIntegrationTestCase, MulledJobTestCases):
|
||||
# singularity passes $HOME by default
|
||||
default_container_home_dir = os.environ.get("HOME", "/")
|
||||
job_config_file = EMBEDDED_PULSAR_JOB_CONFIG_FILE_SINGULARITY
|
||||
container_type = "singularity"
|
||||
|
||||
|
||||
class EmbeddedDockerPulsarIntegrationTestCase(BaseEmbeddedPulsarContainerIntegrationTestCase, MulledJobTestCases):
|
||||
class TestEmbeddedDockerPulsarIntegration(BaseEmbeddedPulsarContainerIntegrationTestCase, MulledJobTestCases):
|
||||
job_config_file = EMBEDDED_PULSAR_JOB_CONFIG_FILE_DOCKER
|
||||
container_type = "docker"
|
||||
|
||||
|
||||
instance = integration_util.integration_module_instance(EmbeddedSingularityPulsarIntegrationTestCase)
|
||||
instance = integration_util.integration_module_instance(TestEmbeddedSingularityPulsarIntegration)
|
||||
|
||||
test_tools = integration_util.integration_tool_runner(
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@ from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class QuotaIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestQuotaIntegration(integration_util.IntegrationTestCase):
|
||||
require_admin_user = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -24,6 +24,7 @@ USER_EMAIL = "user@bx.psu.edu"
|
||||
|
||||
|
||||
class ConfiguresRemoteFilesIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
library_dir: ClassVar[str]
|
||||
user_library_dir: ClassVar[str]
|
||||
ftp_upload_dir: ClassVar[str]
|
||||
@@ -68,7 +69,7 @@ class ConfiguresRemoteFilesIntegrationTestCase(integration_util.IntegrationTestC
|
||||
return ftp_dir
|
||||
|
||||
|
||||
class RemoteFilesIntegrationTestCase(ConfiguresRemoteFilesIntegrationTestCase):
|
||||
class TestRemoteFilesIntegration(ConfiguresRemoteFilesIntegrationTestCase):
|
||||
def test_index(self):
|
||||
index = self.galaxy_interactor.get("remote_files?target=importdir").json()
|
||||
self._assert_index_empty(index)
|
||||
@@ -255,7 +256,7 @@ class RemoteFilesIntegrationTestCase(ConfiguresRemoteFilesIntegrationTestCase):
|
||||
assert c["li_attr"]["full_path"] == "subdir1/c"
|
||||
|
||||
|
||||
class RemoteFilesNotConfiguredIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestRemoteFilesNotConfiguredIntegration(integration_util.IntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
from .test_remote_files import ConfiguresRemoteFilesIntegrationTestCase
|
||||
|
||||
|
||||
class RemoteFilesHistoryImportExportIntegrationTestCase(ConfiguresRemoteFilesIntegrationTestCase):
|
||||
class TestRemoteFilesHistoryImportExportIntegration(ConfiguresRemoteFilesIntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@ from galaxy_test.driver.integration_setup import (
|
||||
)
|
||||
|
||||
|
||||
class PosixFileSourceIntegrationTestCase(PosixFileSourceSetup, integration_util.IntegrationTestCase):
|
||||
class TestPosixFileSourceIntegration(PosixFileSourceSetup, integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._write_file_fixtures()
|
||||
|
||||
@@ -9,7 +9,7 @@ from galaxy_test.driver import integration_util
|
||||
GNUPLOT = {"version": "4.6", "type": "package", "name": "gnuplot"}
|
||||
|
||||
|
||||
class CondaResolutionIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestCondaResolutionIntegration(integration_util.IntegrationTestCase):
|
||||
|
||||
"""Test conda dependency resolution through API."""
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class ScriptsIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestScriptsIntegration(integration_util.IntegrationTestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -3,7 +3,7 @@ from galaxy_test.driver import integration_util
|
||||
from galaxy_test.driver.uses_shed import UsesShed
|
||||
|
||||
|
||||
class ToolShedToolTestIntegrationTestCase(integration_util.IntegrationTestCase, UsesShed):
|
||||
class TestToolShedToolTestIntegration(integration_util.IntegrationTestCase, UsesShed):
|
||||
|
||||
"""Test data manager installation and table reload through the API"""
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ THIS_DIR = os.path.dirname(__file__)
|
||||
SOURCE_TOOL_DATA_DIRECTORY = os.path.join(THIS_DIR, os.pardir, "functional", "tool-data")
|
||||
|
||||
|
||||
class AdminToolDataIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestAdminToolDataIntegration(integration_util.IntegrationTestCase):
|
||||
require_admin_user = True
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -23,12 +23,12 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
)
|
||||
|
||||
from galaxy.util.unittest import TestCase
|
||||
from galaxy_test.base.api_util import TEST_USER
|
||||
from galaxy_test.base.constants import (
|
||||
ONE_TO_SIX_ON_WINDOWS,
|
||||
@@ -47,7 +47,7 @@ TEST_DATA_DIRECTORY = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, "test-data"
|
||||
|
||||
|
||||
class BaseUploadContentConfigurationInstance(integration_util.IntegrationInstance):
|
||||
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
def setUp(self):
|
||||
@@ -80,11 +80,11 @@ class BaseUploadContentConfigurationInstance(integration_util.IntegrationInstanc
|
||||
os.makedirs(path)
|
||||
|
||||
|
||||
class BaseUploadContentConfigurationTestCase(BaseUploadContentConfigurationInstance, unittest.TestCase):
|
||||
class BaseUploadContentConfigurationTestCase(BaseUploadContentConfigurationInstance, TestCase):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidFetchRequestsTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestInvalidFetchRequests(BaseUploadContentConfigurationTestCase):
|
||||
def test_in_place_not_allowed(self):
|
||||
elements = [{"src": "files", "in_place": False}]
|
||||
target = {
|
||||
@@ -108,7 +108,7 @@ class InvalidFetchRequestsTestCase(BaseUploadContentConfigurationTestCase):
|
||||
assert "Failed to find uploaded file matching target" in response.json()["err_msg"]
|
||||
|
||||
|
||||
class NonAdminsCannotPasteFilePathTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestNonAdminsCannotPasteFilePath(BaseUploadContentConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -182,7 +182,7 @@ class NonAdminsCannotPasteFilePathTestCase(BaseUploadContentConfigurationTestCas
|
||||
assert os.path.exists(path)
|
||||
|
||||
|
||||
class AdminsCanPasteFilePathsTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestAdminsCanPasteFilePaths(BaseUploadContentConfigurationTestCase):
|
||||
|
||||
require_admin_user = True
|
||||
|
||||
@@ -252,7 +252,7 @@ class AdminsCanPasteFilePathsTestCase(BaseUploadContentConfigurationTestCase):
|
||||
assert os.path.exists(path)
|
||||
|
||||
|
||||
class DefaultBinaryContentFiltersTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestDefaultBinaryContentFilters(BaseUploadContentConfigurationTestCase):
|
||||
|
||||
require_admin_user = True
|
||||
|
||||
@@ -276,7 +276,7 @@ class DefaultBinaryContentFiltersTestCase(BaseUploadContentConfigurationTestCase
|
||||
assert dataset["file_size"] == 0
|
||||
|
||||
|
||||
class DisableContentCheckingTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestDisableContentChecking(BaseUploadContentConfigurationTestCase):
|
||||
|
||||
require_admin_user = True
|
||||
|
||||
@@ -295,7 +295,7 @@ class DisableContentCheckingTestCase(BaseUploadContentConfigurationTestCase):
|
||||
assert dataset["file_size"] != 0
|
||||
|
||||
|
||||
class AutoDecompressTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestAutoDecompress(BaseUploadContentConfigurationTestCase):
|
||||
|
||||
require_admin_user = True
|
||||
|
||||
@@ -323,7 +323,7 @@ class AutoDecompressTestCase(BaseUploadContentConfigurationTestCase):
|
||||
assert dataset["file_ext"] == "sam", dataset
|
||||
|
||||
|
||||
class LocalAddressWhitelisting(BaseUploadContentConfigurationTestCase):
|
||||
class TestLocalAddressWhitelisting(BaseUploadContentConfigurationTestCase):
|
||||
def test_blocked_url_for_primary_file(self):
|
||||
payload = self.dataset_populator.upload_payload(self.history_id, "http://localhost/", file_type="txt")
|
||||
create_response = self.dataset_populator.tools_post(payload)
|
||||
@@ -415,7 +415,7 @@ class BaseFtpUploadConfigurationTestCase(BaseUploadContentConfigurationTestCase)
|
||||
return ftp_path
|
||||
|
||||
|
||||
class SimpleFtpUploadConfigurationTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
class TestSimpleFtpUploadConfiguration(BaseFtpUploadConfigurationTestCase):
|
||||
def test_ftp_upload(self):
|
||||
content = "hello world\n"
|
||||
ftp_path = self._write_ftp_file(content)
|
||||
@@ -453,13 +453,13 @@ class SimpleFtpUploadConfigurationTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
self._check_content(dataset, content)
|
||||
|
||||
|
||||
class ExplicitEmailAsIdentifierFtpUploadConfigurationTestCase(SimpleFtpUploadConfigurationTestCase):
|
||||
class TestExplicitEmailAsIdentifierFtpUploadConfiguration(TestSimpleFtpUploadConfiguration):
|
||||
@classmethod
|
||||
def handle_extra_ftp_config(cls, config):
|
||||
config["ftp_upload_dir_identifier"] = "email"
|
||||
|
||||
|
||||
class PerUsernameFtpUploadConfigurationTestCase(SimpleFtpUploadConfigurationTestCase):
|
||||
class TestPerUsernameFtpUploadConfiguration(TestSimpleFtpUploadConfiguration):
|
||||
@classmethod
|
||||
def handle_extra_ftp_config(cls, config):
|
||||
config["ftp_upload_dir_identifier"] = "username"
|
||||
@@ -469,7 +469,7 @@ class PerUsernameFtpUploadConfigurationTestCase(SimpleFtpUploadConfigurationTest
|
||||
return os.path.join(self.ftp_dir(), username)
|
||||
|
||||
|
||||
class TemplatedFtpDirectoryUploadConfigurationTestCase(SimpleFtpUploadConfigurationTestCase):
|
||||
class TestTemplatedFtpDirectoryUploadConfiguration(TestSimpleFtpUploadConfiguration):
|
||||
@classmethod
|
||||
def handle_extra_ftp_config(cls, config):
|
||||
config["ftp_upload_dir_template"] = "${ftp_upload_dir}/moo_${ftp_upload_dir_identifier}_cow"
|
||||
@@ -478,7 +478,7 @@ class TemplatedFtpDirectoryUploadConfigurationTestCase(SimpleFtpUploadConfigurat
|
||||
return os.path.join(self.ftp_dir(), f"moo_{TEST_USER}_cow")
|
||||
|
||||
|
||||
class DisableFtpPurgeUploadConfigurationTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
class TestDisableFtpPurgeUploadConfiguration(BaseFtpUploadConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_extra_ftp_config(cls, config):
|
||||
config["ftp_upload_purge"] = "False"
|
||||
@@ -489,7 +489,7 @@ class DisableFtpPurgeUploadConfigurationTestCase(BaseFtpUploadConfigurationTestC
|
||||
assert os.path.exists(ftp_path)
|
||||
|
||||
|
||||
class EnableFtpPurgeUploadConfigurationTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
class TestEnableFtpPurgeUploadConfiguration(BaseFtpUploadConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_extra_ftp_config(cls, config):
|
||||
config["ftp_upload_purge"] = "True"
|
||||
@@ -499,7 +499,7 @@ class EnableFtpPurgeUploadConfigurationTestCase(BaseFtpUploadConfigurationTestCa
|
||||
assert not os.path.exists(ftp_path)
|
||||
|
||||
|
||||
class AdvancedFtpUploadFetchTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
class TestAdvancedFtpUploadFetch(BaseFtpUploadConfigurationTestCase):
|
||||
def test_fetch_ftp_directory(self):
|
||||
dir_path = self._get_user_ftp_path()
|
||||
self._write_file(os.path.join(dir_path, "subdir"), "content 1", filename="1")
|
||||
@@ -554,7 +554,7 @@ class AdvancedFtpUploadFetchTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
assert element0["element_identifier"] == "subdirel1"
|
||||
|
||||
|
||||
class UploadOptionsFtpUploadConfigurationTestCase(BaseFtpUploadConfigurationTestCase):
|
||||
class TestUploadOptionsFtpUploadConfiguration(BaseFtpUploadConfigurationTestCase):
|
||||
def test_upload_api_option_space_to_tab(self):
|
||||
self._write_user_ftp_file("0.txt", ONE_TO_SIX_WITH_SPACES)
|
||||
self._write_user_ftp_file("1.txt", ONE_TO_SIX_WITH_SPACES)
|
||||
@@ -666,7 +666,7 @@ class UploadOptionsFtpUploadConfigurationTestCase(BaseFtpUploadConfigurationTest
|
||||
return self._write_file(os.path.join(self.ftp_dir(), TEST_USER), content, filename=path)
|
||||
|
||||
|
||||
class ServerDirectoryOffByDefaultTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestServerDirectoryOffByDefault(BaseUploadContentConfigurationTestCase):
|
||||
|
||||
require_admin_user = True
|
||||
|
||||
@@ -685,7 +685,7 @@ class ServerDirectoryOffByDefaultTestCase(BaseUploadContentConfigurationTestCase
|
||||
assert '"library_import_dir" is not set' in response.json()["err_msg"]
|
||||
|
||||
|
||||
class ServerDirectoryValidUsageTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestServerDirectoryValidUsage(BaseUploadContentConfigurationTestCase):
|
||||
# This tests the library contents API - I think equivalent functionality is available via library datasets API
|
||||
# and should also be tested.
|
||||
|
||||
@@ -738,7 +738,7 @@ class ServerDirectoryValidUsageTestCase(BaseUploadContentConfigurationTestCase):
|
||||
return cls.temp_config_dir("server")
|
||||
|
||||
|
||||
class UserServerDirectoryOffByDefaultTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestUserServerDirectoryOffByDefault(BaseUploadContentConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -754,7 +754,7 @@ class UserServerDirectoryOffByDefaultTestCase(BaseUploadContentConfigurationTest
|
||||
assert response.status_code == 403, response.json()
|
||||
|
||||
|
||||
class UserServerDirectoryValidUsageTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestUserServerDirectoryValidUsage(BaseUploadContentConfigurationTestCase):
|
||||
@classmethod
|
||||
def user_server_dir(cls):
|
||||
return cls.temp_config_dir("user_library_import_dir")
|
||||
@@ -786,7 +786,7 @@ class UserServerDirectoryValidUsageTestCase(BaseUploadContentConfigurationTestCa
|
||||
assert library_dataset["file_size"] == 12, library_dataset
|
||||
|
||||
|
||||
class FetchByPathTestCase(BaseUploadContentConfigurationTestCase):
|
||||
class TestFetchByPath(BaseUploadContentConfigurationTestCase):
|
||||
|
||||
require_admin_user = True
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from galaxy_test.driver import integration_util
|
||||
TEST_USER_EMAIL = "vault_test_user@bx.psu.edu"
|
||||
|
||||
|
||||
class ExtraUserPreferencesTestCase(integration_util.IntegrationTestCase):
|
||||
class TestExtraUserPreferences(integration_util.IntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -11,7 +11,8 @@ FILE_SOURCES_VAULT_CONF = os.path.join(SCRIPT_DIRECTORY, "file_sources_conf_vaul
|
||||
VAULT_CONF = os.path.join(SCRIPT_DIRECTORY, "vault_conf.yml")
|
||||
|
||||
|
||||
class VaultFileSourceIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestVaultFileSourceIntegration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
USER_1_APP_VAULT_ENTRY = "randomvaultuser1@universe.com"
|
||||
USER_2_APP_VAULT_ENTRY = "randomvaultuser2@universe.com"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class BaseWebFrameworkTestCase(integration_util.IntegrationTestCase):
|
||||
return options_response
|
||||
|
||||
|
||||
class CorsDefaultIntegrationTestCase(BaseWebFrameworkTestCase):
|
||||
class TestCorsDefaultIntegration(BaseWebFrameworkTestCase):
|
||||
def test_options(self):
|
||||
headers = {
|
||||
"Access-Control-Request-Method": "GET",
|
||||
@@ -32,7 +32,7 @@ class CorsDefaultIntegrationTestCase(BaseWebFrameworkTestCase):
|
||||
assert "access-control-allow-origin" not in options_response.headers
|
||||
|
||||
|
||||
class AllowOriginIntegrationTestCase(BaseWebFrameworkTestCase):
|
||||
class TestAllowOriginIntegration(BaseWebFrameworkTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -18,7 +18,9 @@ skip_if_no_webdav = pytest.mark.skipif(not os.environ.get("GALAXY_TEST_WEBDAV"),
|
||||
|
||||
|
||||
@skip_if_no_webdav
|
||||
class WebDavIntegrationTestCase(integration_util.IntegrationTestCase):
|
||||
class TestWebDavIntegration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -16,7 +16,9 @@ execution:
|
||||
"""
|
||||
|
||||
|
||||
class WorkQueuePutFailureTestCase(integration_util.IntegrationTestCase):
|
||||
class TestWorkQueuePutFailure(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
|
||||
|
||||
@@ -97,7 +97,7 @@ def config_file(template, assign_with=""):
|
||||
|
||||
|
||||
class BaseWorkflowHandlerConfigurationTestCase(integration_util.IntegrationTestCase):
|
||||
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
assign_with = ""
|
||||
|
||||
@@ -139,7 +139,7 @@ class BaseWorkflowHandlerConfigurationTestCase(integration_util.IntegrationTestC
|
||||
return self._app.workflow_scheduling_manager.request_monitor is not None
|
||||
|
||||
|
||||
class HistoryRestrictionConfigurationTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestHistoryRestrictionConfiguration(BaseWorkflowHandlerConfigurationTestCase):
|
||||
|
||||
# Assign with db-preassign. Would also work with grabbing assignment, but we don't start grabber.
|
||||
assign_with = "db-preassign"
|
||||
@@ -156,7 +156,7 @@ class HistoryRestrictionConfigurationTestCase(BaseWorkflowHandlerConfigurationTe
|
||||
assert JOB_HANDLER_PATTERN.match(workflow_invocations[0].handler)
|
||||
|
||||
|
||||
class HistoryParallelConfigurationTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestHistoryParallelConfiguration(BaseWorkflowHandlerConfigurationTestCase):
|
||||
|
||||
# Assign with db-preassign. Would also work with grabbing assignment, but we don't start grabber.
|
||||
assign_with = "db-preassign"
|
||||
@@ -180,7 +180,7 @@ class HistoryParallelConfigurationTestCase(BaseWorkflowHandlerConfigurationTestC
|
||||
|
||||
|
||||
# Setup an explicit workflow handler and make sure this is assigned to that.
|
||||
class WorkflowSchedulerHandlerAssignment(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestWorkflowSchedulerHandlerAssignment(BaseWorkflowHandlerConfigurationTestCase):
|
||||
|
||||
# Assign with db-preassign. Would also work with grabbing assignment, but we don't start grabber.
|
||||
assign_with = "db-preassign"
|
||||
@@ -207,7 +207,7 @@ class WorkflowSchedulerHandlerAssignment(BaseWorkflowHandlerConfigurationTestCas
|
||||
# - If a workflow scheduler conf is defined and assign_with is set to db-skip-locked, invocation handler is correctly set
|
||||
# - If a workflow scheduler conf is defined and assign_with is set to db-transaction-isolation, invocation handler is correctly set
|
||||
# - If a workflow scheduler conf is defined and the process is not listed as a handler, it is not workflow scheduler.
|
||||
class DefaultWorkflowHandlerOnTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestDefaultWorkflowHandlerOn(BaseWorkflowHandlerConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
# Override so we don't setup a job conf like in the base class.
|
||||
@@ -217,7 +217,7 @@ class DefaultWorkflowHandlerOnTestCase(BaseWorkflowHandlerConfigurationTestCase)
|
||||
assert self.is_app_workflow_scheduler
|
||||
|
||||
|
||||
class DefaultWorkflowHandlerIfJobHandlerOnTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestDefaultWorkflowHandlerIfJobHandlerOn(BaseWorkflowHandlerConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -227,7 +227,7 @@ class DefaultWorkflowHandlerIfJobHandlerOnTestCase(BaseWorkflowHandlerConfigurat
|
||||
assert self.is_app_workflow_scheduler
|
||||
|
||||
|
||||
class JobHandlerAsWorkflowHandlerWithDbSkipLocked(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestJobHandlerAsWorkflowHandlerWithDbSkipLocked(BaseWorkflowHandlerConfigurationTestCase):
|
||||
|
||||
assign_with = "db-skip-locked"
|
||||
|
||||
@@ -246,7 +246,7 @@ class JobHandlerAsWorkflowHandlerWithDbSkipLocked(BaseWorkflowHandlerConfigurati
|
||||
assert self.is_app_workflow_scheduler
|
||||
|
||||
|
||||
class JobHandlerAsWorkflowHandlerWithDbSkipLockedAttachToPool(JobHandlerAsWorkflowHandlerWithDbSkipLocked):
|
||||
class TestJobHandlerAsWorkflowHandlerWithDbSkipLockedAttachToPool(TestJobHandlerAsWorkflowHandlerWithDbSkipLocked):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
config["job_config_file"] = config_file(POOL_JOB_CONFIG_TEMPLATE, assign_with=cls.assign_with)
|
||||
@@ -254,7 +254,7 @@ class JobHandlerAsWorkflowHandlerWithDbSkipLockedAttachToPool(JobHandlerAsWorkfl
|
||||
config["attach_to_pools"] = ["job-handlers"]
|
||||
|
||||
|
||||
class DefaultWorkflowHandlerIfJobHandlerOffTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestDefaultWorkflowHandlerIfJobHandlerOff(BaseWorkflowHandlerConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -264,7 +264,7 @@ class DefaultWorkflowHandlerIfJobHandlerOffTestCase(BaseWorkflowHandlerConfigura
|
||||
assert not self.is_app_workflow_scheduler
|
||||
|
||||
|
||||
class ExplicitWorkflowHandlersOnTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestExplicitWorkflowHandlersOn(BaseWorkflowHandlerConfigurationTestCase):
|
||||
|
||||
assign_with = ""
|
||||
|
||||
@@ -281,7 +281,7 @@ class ExplicitWorkflowHandlersOnTestCase(BaseWorkflowHandlerConfigurationTestCas
|
||||
|
||||
|
||||
@integration_util.skip_unless_postgres()
|
||||
class WorkflowSchedulerHandlerAssignmentDbSkipLocked(ExplicitWorkflowHandlersOnTestCase):
|
||||
class TestWorkflowSchedulerHandlerAssignmentDbSkipLocked(TestExplicitWorkflowHandlersOn):
|
||||
|
||||
assign_with = "db-skip-locked"
|
||||
|
||||
@@ -293,12 +293,12 @@ class WorkflowSchedulerHandlerAssignmentDbSkipLocked(ExplicitWorkflowHandlersOnT
|
||||
|
||||
|
||||
@integration_util.skip_unless_postgres()
|
||||
class WorkflowSchedulerHandlerAssignmentDbTransactionIsolation(WorkflowSchedulerHandlerAssignmentDbSkipLocked):
|
||||
class TestWorkflowSchedulerHandlerAssignmentDbTransactionIsolation(TestWorkflowSchedulerHandlerAssignmentDbSkipLocked):
|
||||
|
||||
assign_with = "db-transaction-isolation"
|
||||
|
||||
|
||||
class ExplicitWorkflowHandlersOffTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestExplicitWorkflowHandlersOff(BaseWorkflowHandlerConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -311,7 +311,7 @@ class ExplicitWorkflowHandlersOffTestCase(BaseWorkflowHandlerConfigurationTestCa
|
||||
assert not self.is_app_workflow_scheduler
|
||||
|
||||
|
||||
class ExplicitWorkflowHandlersOffPoolTestCase(BaseWorkflowHandlerConfigurationTestCase):
|
||||
class TestExplicitWorkflowHandlersOffPool(BaseWorkflowHandlerConfigurationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -8,8 +8,8 @@ from galaxy_test.base.uses_shed_api import UsesShedApi
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class WorkflowInvocationTestCase(integration_util.IntegrationTestCase, UsesShedApi):
|
||||
|
||||
class TestWorkflowInvocation(integration_util.IntegrationTestCase, UsesShedApi):
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
require_admin_user = False
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ steps:
|
||||
"""
|
||||
|
||||
|
||||
class WorkflowRefactoringIntegrationTestCase(integration_util.IntegrationTestCase, UsesShedApi):
|
||||
class TestWorkflowRefactoringIntegration(integration_util.IntegrationTestCase, UsesShedApi):
|
||||
|
||||
framework_tool_and_types = True
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ from galaxy_test.base.populators import (
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class MaximumWorkflowInvocationDurationTestCase(integration_util.IntegrationTestCase):
|
||||
|
||||
class TestMaximumWorkflowInvocationDuration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
def setUp(self):
|
||||
@@ -46,8 +46,8 @@ class MaximumWorkflowInvocationDurationTestCase(integration_util.IntegrationTest
|
||||
assert state == "failed", state
|
||||
|
||||
|
||||
class MaximumWorkflowJobsPerSchedulingIterationTestCase(integration_util.IntegrationTestCase):
|
||||
|
||||
class TestMaximumWorkflowJobsPerSchedulingIteration(integration_util.IntegrationTestCase):
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -13,7 +13,7 @@ from galaxy_test.base.workflow_fixtures import WORKFLOW_SIMPLE_CAT_TWICE
|
||||
from galaxy_test.driver import integration_util
|
||||
|
||||
|
||||
class WorkflowSyncTestCase(integration_util.IntegrationTestCase):
|
||||
class TestWorkflowSync(integration_util.IntegrationTestCase):
|
||||
|
||||
framework_tool_and_types = True
|
||||
require_admin_user = True
|
||||
|
||||
@@ -22,10 +22,8 @@ from galaxy_test.driver.integration_setup import PosixFileSourceSetup
|
||||
from galaxy_test.driver.integration_util import IntegrationTestCase
|
||||
|
||||
|
||||
class WorkflowTasksIntegrationTestCase(
|
||||
PosixFileSourceSetup, IntegrationTestCase, UsesCeleryTasks, RunsWorkflowFixtures
|
||||
):
|
||||
|
||||
class TestWorkflowTasksIntegration(PosixFileSourceSetup, IntegrationTestCase, UsesCeleryTasks, RunsWorkflowFixtures):
|
||||
dataset_populator: DatasetPopulator
|
||||
framework_tool_and_types = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from galaxy_test.driver import integration_util
|
||||
from galaxy_test.selenium import framework
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy_test.selenium.framework import SeleniumSessionDatasetPopulator
|
||||
|
||||
selenium_test = framework.selenium_test
|
||||
|
||||
|
||||
class SeleniumIntegrationTestCase(
|
||||
integration_util.IntegrationTestCase, framework.TestWithSeleniumMixin, framework.UsesLibraryAssertions
|
||||
):
|
||||
dataset_populator: "SeleniumSessionDatasetPopulator"
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.setup_selenium()
|
||||
|
||||
@@ -6,7 +6,7 @@ from .framework import (
|
||||
)
|
||||
|
||||
|
||||
class AdminDependencyContainersTestCase(SeleniumIntegrationTestCase):
|
||||
class TestAdminDependencyContainers(SeleniumIntegrationTestCase):
|
||||
requires_admin = True
|
||||
|
||||
@selenium_test
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from galaxy_test.driver.integration_setup import PosixFileSourceSetup
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SeleniumIntegrationTestCase,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy_test.selenium.framework import SeleniumSessionDatasetPopulator
|
||||
|
||||
class DatasetSourceTransformSeleniumIntegrationTestCase(PosixFileSourceSetup, SeleniumIntegrationTestCase):
|
||||
|
||||
class TestDatasetSourceTransformSeleniumIntegration(PosixFileSourceSetup, SeleniumIntegrationTestCase):
|
||||
dataset_populator: "SeleniumSessionDatasetPopulator"
|
||||
ensure_registered = True
|
||||
include_test_data_dir = True
|
||||
|
||||
@@ -82,7 +88,7 @@ class DatasetSourceTransformSeleniumIntegrationTestCase(PosixFileSourceSetup, Se
|
||||
self._write_file_fixtures()
|
||||
|
||||
|
||||
class DatasetSourceTransformInModelStoreSeleniumIntegrationTestCase(DatasetSourceTransformSeleniumIntegrationTestCase):
|
||||
class TestDatasetSourceTransformInModelStoreSeleniumIntegration(TestDatasetSourceTransformSeleniumIntegration):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -5,7 +5,7 @@ from .framework import (
|
||||
)
|
||||
|
||||
|
||||
class EdamToolPanelViewsSeleniumIntegrationTestCase(SeleniumIntegrationTestCase):
|
||||
class TestEdamToolPanelViewsSeleniumIntegration(SeleniumIntegrationTestCase):
|
||||
|
||||
ensure_registered = True # to test workflow editor
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from .framework import (
|
||||
)
|
||||
|
||||
|
||||
class HistoryImportExportFtpSeleniumIntegrationTestCase(SeleniumIntegrationTestCase):
|
||||
class TestHistoryImportExportFtpSeleniumIntegration(SeleniumIntegrationTestCase):
|
||||
ensure_registered = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -4,7 +4,7 @@ from .framework import (
|
||||
)
|
||||
|
||||
|
||||
class PagesPdfExportSeleniumIntegrationTestCase(SeleniumIntegrationTestCase):
|
||||
class TestPagesPdfExportSeleniumIntegration(SeleniumIntegrationTestCase):
|
||||
ensure_registered = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -10,7 +10,7 @@ TEST_FILTER_MODULES = "galaxy.selenium.toolbox"
|
||||
TEST_SECTION_FILTERS = "filters:restrict_test"
|
||||
|
||||
|
||||
class ToolboxFiltersSeleniumIntegrationTestCase(SeleniumIntegrationTestCase):
|
||||
class TestToolboxFiltersSeleniumIntegration(SeleniumIntegrationTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -25,7 +25,7 @@ TRS_VERSION_WORKFLOWHUB = "4"
|
||||
WORKFLOW_NAME = "COVID-19: variation analysis on ARTIC PE data"
|
||||
|
||||
|
||||
class TrsImportTestCase(SeleniumIntegrationTestCase):
|
||||
class TestTrsImport(SeleniumIntegrationTestCase):
|
||||
ensure_registered = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from galaxy_test.driver.integration_setup import PosixFileSourceSetup
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SeleniumIntegrationTestCase,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy_test.selenium.framework import SeleniumSessionDatasetPopulator
|
||||
|
||||
|
||||
class TestPosixFileSourceSeleniumIntegration(PosixFileSourceSetup, SeleniumIntegrationTestCase):
|
||||
dataset_populator: "SeleniumSessionDatasetPopulator"
|
||||
|
||||
class PosixFileSourceSeleniumIntegrationTestCase(PosixFileSourceSetup, SeleniumIntegrationTestCase):
|
||||
# For simplicity, otherwise need to setup a different file_sources_config_file
|
||||
requires_admin = True
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from .framework import (
|
||||
)
|
||||
|
||||
|
||||
class UploadFtpSeleniumIntegrationTestCase(SeleniumIntegrationTestCase):
|
||||
class TestUploadFtpSeleniumIntegration(SeleniumIntegrationTestCase):
|
||||
ensure_registered = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from galaxy_test.driver.uses_shed import UsesShed
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SeleniumIntegrationTestCase,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy_test.selenium.framework import SeleniumSessionDatasetPopulator
|
||||
|
||||
class WorkflowEditorToolUpgradeWithToolShedToolTestCase(SeleniumIntegrationTestCase, UsesShed):
|
||||
|
||||
class TestWorkflowEditorToolUpgradeWithToolShedTool(SeleniumIntegrationTestCase, UsesShed):
|
||||
dataset_populator: "SeleniumSessionDatasetPopulator"
|
||||
requires_admin = True
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from galaxy_test.base.workflow_fixtures import WORKFLOW_SIMPLE_CAT_TWICE
|
||||
from galaxy_test.selenium.framework import (
|
||||
managed_history,
|
||||
@@ -9,12 +11,16 @@ from .framework import (
|
||||
SeleniumIntegrationTestCase,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from galaxy_test.selenium.framework import SeleniumSessionDatasetPopulator
|
||||
|
||||
class WorkflowRunTargetNewSeleniumIntegrationTestCase(
|
||||
SeleniumIntegrationTestCase, RunsWorkflows, UsesHistoryItemAssertions
|
||||
):
|
||||
|
||||
class BaseWorkflowRunTargetTestCase(SeleniumIntegrationTestCase, RunsWorkflows, UsesHistoryItemAssertions):
|
||||
dataset_populator: "SeleniumSessionDatasetPopulator"
|
||||
ensure_registered = True
|
||||
|
||||
|
||||
class TestWorkflowRunTargetNewSeleniumIntegration(BaseWorkflowRunTargetTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -39,11 +45,7 @@ class WorkflowRunTargetNewSeleniumIntegrationTestCase(
|
||||
self.assert_item_summary_includes(2, "2 sequences")
|
||||
|
||||
|
||||
class WorkflowRunTargetCurrentSeleniumIntegrationTestCase(
|
||||
SeleniumIntegrationTestCase, RunsWorkflows, UsesHistoryItemAssertions
|
||||
):
|
||||
ensure_registered = True
|
||||
|
||||
class TestWorkflowRunTargetCurrentSeleniumIntegration(BaseWorkflowRunTargetTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
@@ -67,11 +69,7 @@ class WorkflowRunTargetCurrentSeleniumIntegrationTestCase(
|
||||
self.assert_item_summary_includes(2, "2 sequences")
|
||||
|
||||
|
||||
class WorkflowRunTargetSelectNewSeleniumIntegrationTestCase(
|
||||
SeleniumIntegrationTestCase, RunsWorkflows, UsesHistoryItemAssertions
|
||||
):
|
||||
ensure_registered = True
|
||||
|
||||
class TestWorkflowRunTargetSelectNewSeleniumIntegration(BaseWorkflowRunTargetTestCase):
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
super().handle_galaxy_config_kwds(config)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
import uuid
|
||||
from datetime import (
|
||||
datetime,
|
||||
@@ -24,9 +23,10 @@ from galaxy.model import (
|
||||
User,
|
||||
)
|
||||
from galaxy.util import unicodify
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
|
||||
class CustosAuthnzTestCase(unittest.TestCase):
|
||||
class TestCustosAuthnz(TestCase):
|
||||
|
||||
_create_oauth2_session_called = False
|
||||
_fetch_token_called = False
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import logging
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from testfixtures.logcapture import log_capture
|
||||
|
||||
import galaxy.jobs.dynamic_tool_destination as dt
|
||||
from galaxy.jobs.dynamic_tool_destination import map_tool_to_destination
|
||||
from galaxy.jobs.mapper import JobMappingException
|
||||
from galaxy.util.unittest import TestCase
|
||||
from . import (
|
||||
mockGalaxy as mg,
|
||||
ymltests as yt,
|
||||
@@ -88,7 +88,7 @@ valueZ = valueE * 1024
|
||||
valueY = valueZ * 1024
|
||||
|
||||
|
||||
class TestDynamicToolDestination(unittest.TestCase):
|
||||
class TestDynamicToolDestination(TestCase):
|
||||
def setUp(self):
|
||||
self.maxDiff = None
|
||||
self.logger = logging.getLogger()
|
||||
|
||||
@@ -6,7 +6,6 @@ from typing import (
|
||||
List,
|
||||
Tuple,
|
||||
)
|
||||
from unittest import TestCase
|
||||
|
||||
from galaxy.jobs.command_factory import (
|
||||
build_command,
|
||||
@@ -15,6 +14,7 @@ from galaxy.jobs.command_factory import (
|
||||
)
|
||||
from galaxy.tool_util.deps.container_classes import TRAP_KILL_CONTAINER
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
MOCK_COMMAND_LINE = "/opt/galaxy/tools/bowtie /mnt/galaxyData/files/000/input000.dat"
|
||||
TEST_METADATA_LINE = "set_metadata_and_stuff.sh"
|
||||
|
||||
@@ -2,7 +2,6 @@ import datetime
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from pykwalify.core import Core
|
||||
@@ -14,6 +13,7 @@ from galaxy.util import (
|
||||
galaxy_directory,
|
||||
galaxy_samples_directory,
|
||||
)
|
||||
from galaxy.util.unittest import TestCase
|
||||
from galaxy.web_stack import ApplicationStack
|
||||
from galaxy.web_stack.handlers import HANDLER_ASSIGNMENT_METHODS
|
||||
|
||||
@@ -31,7 +31,7 @@ class TestApplicationStack(ApplicationStack):
|
||||
return HANDLER_ASSIGNMENT_METHODS.DB_SKIP_LOCKED
|
||||
|
||||
|
||||
class BaseJobConfXmlParserTestCase(unittest.TestCase):
|
||||
class BaseJobConfXmlParserTestCase(TestCase):
|
||||
extension = "xml"
|
||||
|
||||
def setUp(self):
|
||||
@@ -123,7 +123,7 @@ class BaseJobConfXmlParserTestCase(unittest.TestCase):
|
||||
self._write_config_from(ADVANCED_JOB_CONF_YAML)
|
||||
|
||||
|
||||
class SimpleJobConfXmlParserTestCase(BaseJobConfXmlParserTestCase):
|
||||
class TestSimpleJobConfXmlParser(BaseJobConfXmlParserTestCase):
|
||||
extension = "xml"
|
||||
|
||||
def test_load_simple_runner(self):
|
||||
@@ -239,7 +239,7 @@ class SimpleJobConfXmlParserTestCase(BaseJobConfXmlParserTestCase):
|
||||
assert self.job_config.destinations[name]
|
||||
|
||||
|
||||
class AdvancedJobConfXmlParserTestCase(BaseJobConfXmlParserTestCase):
|
||||
class TestAdvancedJobConfXmlParser(BaseJobConfXmlParserTestCase):
|
||||
def test_disable_job_metrics(self):
|
||||
self._with_advanced_config()
|
||||
self.job_config.destinations["multicore_local"]
|
||||
@@ -350,7 +350,7 @@ class AdvancedJobConfXmlParserTestCase(BaseJobConfXmlParserTestCase):
|
||||
assert self.job_config.resource_groups["memoryonly"] == ["memory"]
|
||||
|
||||
|
||||
class AdvancedJobConfYamlParserTestCase(AdvancedJobConfXmlParserTestCase):
|
||||
class TestAdvancedJobConfYamlParser(TestAdvancedJobConfXmlParser):
|
||||
extension = "yml"
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ from typing import (
|
||||
Dict,
|
||||
Type,
|
||||
)
|
||||
from unittest import TestCase
|
||||
|
||||
from galaxy.app_unittest_utils.tools_support import UsesApp
|
||||
from galaxy.jobs import (
|
||||
@@ -22,6 +21,7 @@ from galaxy.model import (
|
||||
from galaxy.objectstore import ObjectStore
|
||||
from galaxy.tools import ToolBox
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
TEST_TOOL_ID = "cufftest"
|
||||
TEST_VERSION_COMMAND = "bwa --version"
|
||||
@@ -86,12 +86,12 @@ class AbstractTestCases:
|
||||
pass
|
||||
|
||||
|
||||
class JobWrapperTestCase(AbstractTestCases.BaseWrapperTestCase):
|
||||
class TestJobWrapper(AbstractTestCases.BaseWrapperTestCase):
|
||||
def _wrapper(self):
|
||||
return JobWrapper(self.job, self.queue) # type: ignore[arg-type]
|
||||
|
||||
|
||||
class TaskWrapperTestCase(AbstractTestCases.BaseWrapperTestCase):
|
||||
class TestTaskWrapper(AbstractTestCases.BaseWrapperTestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.task = Task(self.job, self.working_directory, "prepare_bwa_job.sh")
|
||||
|
||||
@@ -2,7 +2,6 @@ import os
|
||||
import threading
|
||||
import time
|
||||
from typing import Optional
|
||||
from unittest import TestCase
|
||||
|
||||
import psutil
|
||||
|
||||
@@ -13,6 +12,7 @@ from galaxy import (
|
||||
from galaxy.app_unittest_utils.tools_support import UsesTools
|
||||
from galaxy.jobs.runners import local
|
||||
from galaxy.util import bunch
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
|
||||
class TestLocalJobRunner(TestCase, UsesTools):
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
"""
|
||||
|
||||
import json
|
||||
import unittest
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
from galaxy.app_unittest_utils import galaxy_mock
|
||||
from galaxy.managers.users import UserManager
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
# =============================================================================
|
||||
admin_email = "admin@admin.admin"
|
||||
@@ -16,7 +16,7 @@ default_password = "123456"
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class BaseTestCase(unittest.TestCase):
|
||||
class BaseTestCase(TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
print("\n", "-" * 20, "begin class", cls)
|
||||
|
||||
@@ -18,7 +18,7 @@ user3_data = dict(email="user3@user3.user3", username="user3", password=default_
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class DatasetCollectionManagerTestCase(BaseTestCase, CreatesCollectionsMixin):
|
||||
class TestDatasetCollectionManager(BaseTestCase, CreatesCollectionsMixin):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.dataset_manager = self.app[DatasetManager]
|
||||
|
||||
@@ -23,7 +23,7 @@ user3_data = dict(email="user3@user3.user3", username="user3", password=default_
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class DatasetManagerTestCase(BaseTestCase):
|
||||
class TestDatasetManager(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.dataset_manager = DatasetManager(self.app)
|
||||
@@ -187,7 +187,7 @@ class DatasetManagerTestCase(BaseTestCase):
|
||||
assert not self.dataset_manager.permissions.access.is_permitted(dataset, None)
|
||||
|
||||
|
||||
# class DatasetRBACPermissionsTestCase(BaseTestCase):
|
||||
# class TestDatasetRBACPermissions(BaseTestCase):
|
||||
# def set_up_managers(self):
|
||||
# super().set_up_managers()
|
||||
# self.dataset_manager = DatasetManager(self.app)
|
||||
@@ -205,7 +205,7 @@ def testable_url_for(*a, **k):
|
||||
|
||||
|
||||
@mock.patch("galaxy.managers.datasets.DatasetSerializer.url_for", testable_url_for)
|
||||
class DatasetSerializerTestCase(BaseTestCase):
|
||||
class TestDatasetSerializer(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.dataset_manager = DatasetManager(self.app)
|
||||
|
||||
@@ -34,7 +34,7 @@ class HDATestCase(BaseTestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class HDAManagerTestCase(HDATestCase):
|
||||
class TestHDAManager(HDATestCase):
|
||||
def test_base(self):
|
||||
hda_model = model.HistoryDatasetAssociation
|
||||
owner = self.user_manager.create(**user2_data)
|
||||
@@ -365,7 +365,7 @@ def testable_url_for(*a, **k):
|
||||
|
||||
|
||||
@mock.patch("galaxy.managers.hdas.HDASerializer.url_for", testable_url_for)
|
||||
class HDASerializerTestCase(HDATestCase):
|
||||
class TestHDASerializer(HDATestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.hda_serializer = hdas.HDASerializer(self.app)
|
||||
@@ -526,7 +526,7 @@ class HDASerializerTestCase(HDATestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class HDADeserializerTestCase(HDATestCase):
|
||||
class TestHDADeserializer(HDATestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.hda_deserializer = hdas.HDADeserializer(self.app)
|
||||
@@ -633,7 +633,7 @@ class HDADeserializerTestCase(HDATestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class HDAFilterParserTestCase(HDATestCase):
|
||||
class TestHDAFilterParser(HDATestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.filter_parser = hdas.HDAFilterParser(self.app)
|
||||
|
||||
@@ -58,7 +58,7 @@ def testable_url_for(*a, **k):
|
||||
|
||||
|
||||
@mock.patch("galaxy.managers.hdcas.HDCASerializer.url_for", testable_url_for)
|
||||
class HDCASerializerTestCase(HDCATestCase):
|
||||
class TestHDCASerializer(HDCATestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.hdca_serializer = hdcas.HDCASerializer(self.app)
|
||||
|
||||
@@ -52,7 +52,7 @@ class HistoryAsContainerBaseTestCase(BaseTestCase, CreatesCollectionsMixin):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class HistoryAsContainerTestCase(HistoryAsContainerBaseTestCase):
|
||||
class TestHistoryAsContainer(HistoryAsContainerBaseTestCase):
|
||||
def test_contents(self):
|
||||
user2 = self.user_manager.create(**user2_data)
|
||||
history = self.history_manager.create(name="history", user=user2)
|
||||
@@ -329,7 +329,7 @@ class HistoryAsContainerTestCase(HistoryAsContainerBaseTestCase):
|
||||
assert self.contents_manager.contents(history, filters=filters) == [contents[1], contents[6]]
|
||||
|
||||
|
||||
class HistoryContentsFilterParserTestCase(HistoryAsContainerBaseTestCase):
|
||||
class TestHistoryContentsFilterParser(HistoryAsContainerBaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.filter_parser = history_contents.HistoryContentsFilters(self.app)
|
||||
|
||||
@@ -28,7 +28,7 @@ user4_data = dict(email="user4@user4.user4", username="user4", password=default_
|
||||
parsed_filter = base.ModelFilterParser.parsed_filter
|
||||
|
||||
|
||||
class HistoryManagerTestCase(BaseTestCase):
|
||||
class TestHistoryManager(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.history_manager = self.app[HistoryManager]
|
||||
@@ -384,7 +384,7 @@ def testable_url_for(*a, **k):
|
||||
|
||||
@mock.patch("galaxy.managers.histories.HistorySerializer.url_for", testable_url_for)
|
||||
@mock.patch("galaxy.managers.hdas.HDASerializer.url_for", testable_url_for)
|
||||
class HistorySerializerTestCase(BaseTestCase):
|
||||
class TestHistorySerializer(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.history_manager = self.app[HistoryManager]
|
||||
@@ -606,7 +606,7 @@ class HistorySerializerTestCase(BaseTestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class HistoryDeserializerTestCase(BaseTestCase):
|
||||
class TestHistoryDeserializer(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.history_manager = self.app[HistoryManager]
|
||||
@@ -667,7 +667,7 @@ class HistoryDeserializerTestCase(BaseTestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class HistoryFiltersTestCase(BaseTestCase):
|
||||
class TestHistoryFilters(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.history_manager = self.app[HistoryManager]
|
||||
|
||||
@@ -10,7 +10,7 @@ user2_data = dict(email="user2@user2.user2", username="user2", password=default_
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class TagHandlerTestCase(BaseTestCase):
|
||||
class TestTagHandler(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.app.hda_manager = self.app[hdas.HDAManager]
|
||||
|
||||
@@ -30,7 +30,7 @@ lowercase_email_user = dict(email="user5@user5.user5", username="user5", passwor
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class UserManagerTestCase(BaseTestCase):
|
||||
class TestUserManager(BaseTestCase):
|
||||
def test_framework(self):
|
||||
self.log("(for testing) should have admin_user, and admin_user is current")
|
||||
assert self.trans.user == self.admin_user
|
||||
@@ -121,7 +121,8 @@ class UserManagerTestCase(BaseTestCase):
|
||||
user2 = self.user_manager.create(**user2_data)
|
||||
|
||||
self.log("should be able to tell if a user is anonymous")
|
||||
self.assertRaises(exceptions.AuthenticationFailed, self.user_manager.error_if_anonymous, anon)
|
||||
with self.assertRaises(exceptions.AuthenticationFailed):
|
||||
self.user_manager.error_if_anonymous(anon)
|
||||
assert self.user_manager.error_if_anonymous(user2) == user2
|
||||
|
||||
def test_current(self):
|
||||
@@ -218,7 +219,7 @@ class UserManagerTestCase(BaseTestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class UserSerializerTestCase(BaseTestCase):
|
||||
class TestUserSerializer(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.user_serializer = users.UserSerializer(self.app)
|
||||
@@ -276,7 +277,7 @@ class UserSerializerTestCase(BaseTestCase):
|
||||
self.assertIsJsonifyable(serialized)
|
||||
|
||||
|
||||
class CurrentUserSerializerTestCase(BaseTestCase):
|
||||
class TestCurrentUserSerializer(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.history_manager = self.app[histories.HistoryManager]
|
||||
@@ -303,7 +304,7 @@ class CurrentUserSerializerTestCase(BaseTestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class UserDeserializerTestCase(BaseTestCase):
|
||||
class TestUserDeserializer(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.deserializer = users.UserDeserializer(self.app)
|
||||
@@ -353,7 +354,7 @@ class UserDeserializerTestCase(BaseTestCase):
|
||||
|
||||
|
||||
# =============================================================================
|
||||
class AdminUserFilterParserTestCase(BaseTestCase):
|
||||
class TestAdminUserFilterParser(BaseTestCase):
|
||||
def set_up_managers(self):
|
||||
super().set_up_managers()
|
||||
self.filter_parser = users.AdminUserFilterParser(self.app)
|
||||
|
||||
@@ -84,7 +84,7 @@ class BaseExportTestCase(BaseTestCase):
|
||||
return collection
|
||||
|
||||
|
||||
class ToBasicMarkdownTestCase(BaseExportTestCase):
|
||||
class TestToBasicMarkdown(BaseExportTestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.test_dataset_path = None
|
||||
@@ -329,7 +329,7 @@ job_metrics(job_id=1)
|
||||
return to_basic_markdown(self.trans, example)
|
||||
|
||||
|
||||
class ReadyExportTestCase(BaseExportTestCase):
|
||||
class TestReadyExport(BaseExportTestCase):
|
||||
def test_ready_dataset_display(self):
|
||||
hda = self._new_hda()
|
||||
example = """
|
||||
|
||||
@@ -15,9 +15,10 @@ from galaxy.security.ssh_util import (
|
||||
generate_ssh_keys,
|
||||
SSHKeys,
|
||||
)
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
|
||||
class TestCliInterface(unittest.TestCase):
|
||||
class TestCliInterface(TestCase):
|
||||
ssh_keys: SSHKeys
|
||||
username: str
|
||||
shell_params: Dict[str, Any]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import string
|
||||
import unittest
|
||||
from typing import cast
|
||||
|
||||
from galaxy import model
|
||||
@@ -13,6 +12,7 @@ from galaxy.tools.actions import (
|
||||
on_text_for_names,
|
||||
)
|
||||
from galaxy.util import XML
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
# I cannot think of a saner way to test if data is being wrapped than use a
|
||||
# data param in the output label - though you would probably never want to do
|
||||
@@ -58,7 +58,7 @@ def test_on_text_for_names():
|
||||
assert_on_text_is("data 1 and data 2", "data 1", "data 1", "data 2")
|
||||
|
||||
|
||||
class DefaultToolActionTestCase(unittest.TestCase, tools_support.UsesTools):
|
||||
class TestDefaultToolAction(TestCase, tools_support.UsesTools):
|
||||
def setUp(self):
|
||||
self.setup_app()
|
||||
history = model.History()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
from typing import cast
|
||||
|
||||
from galaxy import (
|
||||
@@ -15,12 +14,13 @@ from galaxy.tool_util.provided_metadata import (
|
||||
LegacyToolProvidedMetadata,
|
||||
NullToolProvidedMetadata,
|
||||
)
|
||||
from galaxy.util.unittest import TestCase
|
||||
|
||||
DEFAULT_TOOL_OUTPUT = "out1"
|
||||
DEFAULT_EXTRA_NAME = "test1"
|
||||
|
||||
|
||||
class CollectPrimaryDatasetsTestCase(unittest.TestCase, tools_support.UsesTools):
|
||||
class TestCollectPrimaryDatasets(TestCase, tools_support.UsesTools):
|
||||
def setUp(self):
|
||||
self.setup_app()
|
||||
object_store = cast(ObjectStore, MockObjectStore())
|
||||
|
||||
@@ -7,7 +7,7 @@ from galaxy.util import bunch
|
||||
from .util import BaseParameterTestCase
|
||||
|
||||
|
||||
class DataColumnParameterTestCase(BaseParameterTestCase):
|
||||
class TestDataColumnParameter(BaseParameterTestCase):
|
||||
def test_not_optional_by_default(self):
|
||||
assert not self.__param_optional()
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from galaxy.app_unittest_utils import galaxy_mock
|
||||
from .util import BaseParameterTestCase
|
||||
|
||||
|
||||
class DataToolParameterTestCase(BaseParameterTestCase):
|
||||
class TestDataToolParameter(BaseParameterTestCase):
|
||||
def test_to_python_none_values(self):
|
||||
assert self.param.to_python(None, self.app) is None
|
||||
assert self.param.to_python("None", self.app) is None
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user