diff --git a/cmem_plugin_base/testing.py b/cmem_plugin_base/testing.py index 2a3a592..c6e3431 100644 --- a/cmem_plugin_base/testing.py +++ b/cmem_plugin_base/testing.py @@ -54,6 +54,7 @@ class TestPluginContext(PluginContext): def __init__(self, project_id: str = "TestProject"): self.project_id = project_id self.user = TestUserContext() + self.system = TestSystemContext() class TestTaskContext(TaskContext): @@ -97,13 +98,34 @@ class TestSystemContext(SystemContext): __test__ = False - def __init__(self) -> None: - self._version: str = "1.0.0" + def __init__( + self, + di_version: str = "1.0.0", + cmem_base_uri: str | None = "http://docker.localhost", + dp_api_endpoint: str | None = "http://docker.localhost/dataplatform", + di_api_endpoint: str = "http://docker.localhost/dataintegration", + ) -> None: + self._version = di_version + self._cmem_base_uri = cmem_base_uri + self._dp_api_endpoint = dp_api_endpoint + self._di_api_endpoint = di_api_endpoint def di_version(self) -> str: """Get data integration version.""" return self._version + def cmem_base_uri(self) -> str | None: + """Get the base URI""" + return self._cmem_base_uri + + def dp_api_endpoint(self) -> str | None: + """Get the URI of DataPlatform.""" + return self._dp_api_endpoint + + def di_api_endpoint(self) -> str: + """Get the URI of DataIntegration.""" + return self._di_api_endpoint + def encrypt(self, value: str) -> str: """Encrypt a value.""" return value