refactor(06-02): update CLI and test imports to kb_workflow.pipeline
- Remove sys.path manipulation from kb_workflow.py - Update CLI imports to use kb_workflow.pipeline prefix - Update all test file imports and patch paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,8 @@ from pathlib import Path
|
||||
import tempfile
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from kb_pipeline.state import WorkflowStateManager
|
||||
from kb_pipeline.schemas import WorkflowState
|
||||
from kb_workflow.pipeline.state import WorkflowStateManager
|
||||
from kb_workflow.pipeline.schemas import WorkflowState
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -9,7 +9,7 @@ import pytest
|
||||
from abc import ABC
|
||||
from typing import Dict, Any
|
||||
|
||||
from kb_pipeline.platforms.base import PlatformAdapter
|
||||
from kb_workflow.pipeline.platforms.base import PlatformAdapter
|
||||
|
||||
|
||||
class TestPlatformAdapterInterface:
|
||||
|
||||
@@ -12,8 +12,8 @@ import pytest
|
||||
from unittest.mock import MagicMock, AsyncMock, patch
|
||||
import asyncio
|
||||
|
||||
from kb_pipeline.platforms.bilibili import BilibiliAdapter
|
||||
from kb_pipeline.errors import NetworkError, AuthError
|
||||
from kb_workflow.pipeline.platforms.bilibili import BilibiliAdapter
|
||||
from kb_workflow.pipeline.errors import NetworkError, AuthError
|
||||
|
||||
|
||||
class TestBilibiliAdapterContentType:
|
||||
|
||||
@@ -12,8 +12,8 @@ import pytest
|
||||
from unittest.mock import MagicMock, patch, PropertyMock
|
||||
import asyncio
|
||||
|
||||
from kb_pipeline.platforms.zhihu import ZhihuAdapter
|
||||
from kb_pipeline.errors import AuthError
|
||||
from kb_workflow.pipeline.platforms.zhihu import ZhihuAdapter
|
||||
from kb_workflow.pipeline.errors import AuthError
|
||||
|
||||
|
||||
class TestZhihuAdapterAnswerContent:
|
||||
@@ -168,7 +168,7 @@ class TestZhihuAdapterCookieHandling:
|
||||
|
||||
def test_cookie_from_settings(self):
|
||||
"""Test cookie is loaded from settings"""
|
||||
with patch('kb_pipeline.platforms.zhihu.get_settings') as mock_settings:
|
||||
with patch('kb_workflow.pipeline.platforms.zhihu.get_settings') as mock_settings:
|
||||
mock_secret = MagicMock()
|
||||
mock_secret.get_secret_value.return_value = "test_cookie_value"
|
||||
mock_settings.return_value.zhihu_cookie = mock_secret
|
||||
|
||||
Reference in New Issue
Block a user