feat: add twitter article markdown command (#16)

This commit is contained in:
jakevin
2026-03-12 14:47:49 +08:00
committed by GitHub
parent 1c0e4b0c39
commit 79eadd2579
9 changed files with 291 additions and 4 deletions

View File

@@ -49,3 +49,16 @@ def test_compact_serialization(tweet_factory) -> None:
assert len(parsed) == 1
assert parsed[0]["author"] == "@alice"
def test_tweet_roundtrip_preserves_article_fields(tweet_factory) -> None:
tweet = tweet_factory(
"88",
article_title="Long-form title",
article_text="Intro\n\n## Details",
)
payload = tweet_to_dict(tweet)
restored = tweet_from_dict(payload)
assert restored.article_title == "Long-form title"
assert restored.article_text == "Intro\n\n## Details"