[broken work lowk]
This commit is contained in:
@@ -59,7 +59,6 @@ from src.providers.custom import CustomAIHandler
|
||||
from src.providers.dispatcher import UnifiedDispatcher
|
||||
from src.providers.oauth import ChatGPTOAuthHandler
|
||||
from src.services.message_fetcher import FormattedMessage, MessageFetcher
|
||||
from src.ui.progress_widget import PinnedProgressManager
|
||||
|
||||
|
||||
class MockPlugin:
|
||||
@@ -98,7 +97,7 @@ class TestPluginMetadata(unittest.TestCase):
|
||||
|
||||
def test_plugin_entrypoint_metadata(self):
|
||||
from importlib.machinery import SourceFileLoader
|
||||
plugin_path = os.path.join(BASE_DIR, "ai_chat_summary.plugin")
|
||||
plugin_path = os.path.join(BASE_DIR, "dist", "ai_chat_summary.plugin")
|
||||
mod = SourceFileLoader("ai_chat_summaries_bundle", plugin_path).load_module()
|
||||
self.assertTrue(bool(getattr(mod, "__id__", None)))
|
||||
self.assertTrue(bool(getattr(mod, "__name__", None)))
|
||||
@@ -109,7 +108,7 @@ class TestPluginMetadata(unittest.TestCase):
|
||||
|
||||
def test_plugin_lifecycle_and_settings(self):
|
||||
from importlib.machinery import SourceFileLoader
|
||||
plugin_path = os.path.join(BASE_DIR, "ai_chat_summary.plugin")
|
||||
plugin_path = os.path.join(BASE_DIR, "dist", "ai_chat_summary.plugin")
|
||||
mod = SourceFileLoader("ai_chat_summaries_bundle", plugin_path).load_module()
|
||||
plugin = mod.AIChatSummariesPlugin()
|
||||
|
||||
@@ -409,13 +408,15 @@ class TestMessageFetcher(unittest.TestCase):
|
||||
time_str="2023-11-14 22:13",
|
||||
sender_name="Alice Wonderland",
|
||||
sender_username="@alice",
|
||||
sender_id=42,
|
||||
text="Let's schedule our release for Monday 10am UTC.",
|
||||
reply_to_id=98,
|
||||
forward_from="Bob",
|
||||
media_info="[Photo: System architecture]",
|
||||
)
|
||||
line = msg.to_transcript_line()
|
||||
self.assertIn("[2023-11-14 22:13] #101 Alice Wonderland (fwd: Bob, reply-to #98):", line)
|
||||
self.assertIn("[2023-11-14 22:13] #101 <user:42> (fwd: Bob, reply-to #98):", line)
|
||||
self.assertNotIn("Alice Wonderland", line)
|
||||
self.assertIn("[Photo: System architecture]", line)
|
||||
self.assertIn("Let's schedule our release for Monday 10am UTC.", line)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user