Files
galaxy/test/integration/test_dynamic_edam_loading.py
T
Nicola Soranzo c35d8f2a06 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
2022-09-27 03:34:58 +01:00

37 lines
1.3 KiB
Python

import os
from galaxy_test.base.populators import DatasetPopulator
from galaxy_test.driver import integration_util
SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
MOCK_BIOTOOLS_CONTENT = os.path.join(SCRIPT_DIRECTORY, "mock_biotools_content")
class TestDynamicEdamLoadingIntegration(integration_util.IntegrationTestCase):
"""Test mapping over tools with extended metadata enabled."""
framework_tool_and_types = True
@classmethod
def handle_galaxy_config_kwds(cls, config):
super().handle_galaxy_config_kwds(config)
config["biotools_content_directory"] = MOCK_BIOTOOLS_CONTENT
config["biotools_use_api"] = False
def setUp(self):
super().setUp()
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
def test_edam_properties(self):
result = self._get("tools/bibtex")
result.raise_for_status()
result_json = result.json()
assert "edam_operations" in result_json
assert "edam_topics" in result_json
edam_operations = result_json["edam_operations"]
edam_topics = result_json["edam_topics"]
assert len(edam_operations) == 4
assert "operation_3198" in edam_operations
assert len(edam_topics) == 1
assert "topic_0102" in edam_topics