2860fb5d18
Security / Dependency review (push) Has been skipped
Scorecard / Scorecard analysis (push) Failing after 0s
Validate / eval (push) Failing after 0s
Security / Dependency audit (push) Failing after 1s
Security / Secret scan (push) Failing after 1s
Validate / tests (push) Failing after 0s
Validate / mcp-tests (push) Failing after 1s
GitHub Actions Security Analysis with zizmor 🌈 / zizmor (push) Failing after 1s
Security / SAST scan (push) Failing after 13m52s
26 lines
625 B
Python
26 lines
625 B
Python
"""Tests for Threads source module."""
|
|
|
|
import unittest
|
|
|
|
from lib import threads
|
|
|
|
|
|
class TestExtractCoreSubject(unittest.TestCase):
|
|
"""Test Threads query preprocessing."""
|
|
|
|
def test_caps_verbose_planner_query_to_two_words(self):
|
|
self.assertEqual(
|
|
threads._extract_core_subject("AI video tools OR tutorials"),
|
|
"ai video",
|
|
)
|
|
|
|
def test_caps_all_noise_fallback_to_two_words(self):
|
|
self.assertEqual(
|
|
threads._extract_core_subject("best practices and recommendations"),
|
|
"best practices",
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|