reorg files
This commit is contained in:
+6
-10
@@ -4,9 +4,9 @@ from unittest.mock import AsyncMock, Mock
|
||||
|
||||
import pytest
|
||||
|
||||
import agentci.runtime as runtime_module
|
||||
from agentci.config import Settings
|
||||
from agentci.runtime import Runtime
|
||||
import agentci.application.runtime as runtime_module
|
||||
from agentci.application.runtime import Runtime
|
||||
from agentci.config.settings import Settings
|
||||
|
||||
|
||||
class ClosingClient:
|
||||
@@ -90,7 +90,7 @@ async def test_build_runtime_wires_components_without_starting_real_clients(
|
||||
git = SimpleNamespace()
|
||||
opencode = SimpleNamespace()
|
||||
development = SimpleNamespace()
|
||||
prompts = SimpleNamespace()
|
||||
prompts = SimpleNamespace(schemas_dir=tmp_path / "schemas")
|
||||
services = SimpleNamespace()
|
||||
worker = SimpleNamespace()
|
||||
repository_constructor = Mock(return_value=repository)
|
||||
@@ -112,11 +112,7 @@ async def test_build_runtime_wires_components_without_starting_real_clients(
|
||||
|
||||
built = await runtime_module.build_runtime(settings)
|
||||
|
||||
assert runtime_module.__file__ is not None
|
||||
package_dir = Path(runtime_module.__file__).parent
|
||||
repository_constructor.assert_called_once_with(
|
||||
settings.database_path, package_dir / "migrations"
|
||||
)
|
||||
repository_constructor.assert_called_once_with(settings.database_path)
|
||||
initialize.assert_awaited_once_with()
|
||||
gitea_constructor.assert_called_once_with("https://gitea.example", "token")
|
||||
git_constructor.assert_called_once_with(
|
||||
@@ -131,7 +127,7 @@ async def test_build_runtime_wires_components_without_starting_real_clients(
|
||||
base_url="https://opencode.example",
|
||||
username=settings.opencode_server_username,
|
||||
password="password",
|
||||
schemas_dir=package_dir / "prompts" / "schemas",
|
||||
schemas_dir=prompts.schemas_dir,
|
||||
health_directory=settings.workspaces_dir,
|
||||
required_models=(
|
||||
(settings.plan_model, settings.plan_variant),
|
||||
|
||||
Reference in New Issue
Block a user