refactor(schedule): extract application/ layer (stage 5)
- Move service.py -> application/service.py (SchedulerService class name unchanged; build_object_store / build_storage_http_client move along) - main.py imports schedule.application.service - Rewrite worker.py's lazy `from schedule.service import build_object_store` and test_worker.py's mock patch string targets — same class of bug as the test_janitor patch strings (silent no-op until the old file is deleted) - Delete flat service.py (orphaned; only docstring refs remain in orchestrator, cleaned up in stage 6) - Zero behavior change; schedule/pyproject.toml untouched Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,7 @@ def test_store_for_custom_bucket_uses_build_factory(monkeypatch: pytest.MonkeyPa
|
||||
"""A custom bucket_name must produce a store via ``build_object_store``."""
|
||||
custom_store = MagicMock(name="custom_store")
|
||||
with patch(
|
||||
"schedule.service.build_object_store",
|
||||
"schedule.application.service.build_object_store",
|
||||
return_value=custom_store,
|
||||
) as mock_build:
|
||||
executor, _, _ = _make_executor()
|
||||
@@ -75,7 +75,7 @@ def test_store_for_custom_bucket_is_cached(monkeypatch: pytest.MonkeyPatch) -> N
|
||||
"""Repeated lookups for the same custom bucket must hit the cache."""
|
||||
custom_store = MagicMock(name="custom_store")
|
||||
with patch(
|
||||
"schedule.service.build_object_store",
|
||||
"schedule.application.service.build_object_store",
|
||||
return_value=custom_store,
|
||||
) as mock_build:
|
||||
executor, _, _ = _make_executor()
|
||||
|
||||
Reference in New Issue
Block a user