from aiatlas.connectors.labs.qwen import FEED, QwenConnector from aiatlas.sdk.facts import Target from tests.conftest import extract_from_fixture, fixture_path async def test_feed(): facts = await extract_from_fixture(QwenConnector(), Target(url=FEED, doc_type="feed", key="feed"), fixture_path("qwen", "blog.rss.xml"), content_type="application/xml") assert len(facts.events) == 44 guard = facts.events[0] assert guard.summary == "Qwen: Qwen3Guard: Real-time Safety for Your Token Stream" and guard.category == "release" assert guard.effective_at.date().isoformat() == "2025-09-22" and guard.meta["models_mentioned"] == ["Qwen3Guard"] assert guard.dedupe_key == "ANNOUNCEMENT:https://qwenlm.github.io/blog/qwen3guard/" gspo = next(e for e in facts.events if "GSPO" in e.summary) assert gspo.category == "company" follows = [t for t in facts.targets if t.doc_type == "news"] assert len(follows) == 30 and follows[0].needs_llm is True and follows[0].meta["llm_task"] == "release_announcement" assert next(t for t in follows if "gspo" in t.url).needs_llm is False