@@ -198,26 +198,6 @@ def fake_fetch(_url: str) -> bytes:
198198 )
199199
200200
201- def test_all_zero_entry_feeds_write_quarantine_status_without_hard_failure (tmp_path : Path ) -> None :
202- feeds_path = tmp_path / "feeds.csv"
203- feeds_path .write_text (
204- "feed_id,feed_url,source_type,author\n "
205- "empty,https://example.invalid/empty.xml,official_remarks,Example\n " ,
206- encoding = "utf-8" ,
207- )
208- feed_xml = b"<rss version='2.0'><channel/></rss>"
209-
210- output = tmp_path / "source_items.csv"
211- status = tmp_path / "status.json"
212- rows = fetch_rss_sources (feeds_path , output , status_output = status , fetcher = lambda _url : feed_xml )
213-
214- assert rows == []
215- assert output .read_text (encoding = "utf-8" ) == "item_id,published_at,source_type,source_url,author,text\n "
216- payload = json .loads (status .read_text (encoding = "utf-8" ))
217- assert payload ["quarantined_feed_count" ] == 1
218- assert payload ["accepted_row_count" ] == 0
219- assert payload ["publication_complete" ] is False
220- assert payload ["eligible_for_live_publication" ] is False
221201
222202
223203def test_all_zero_entry_feeds_write_quarantine_status_without_hard_failure (tmp_path : Path ) -> None :
@@ -236,6 +216,7 @@ def test_all_zero_entry_feeds_write_quarantine_status_without_hard_failure(tmp_p
236216 assert rows == []
237217 assert output .read_text (encoding = "utf-8" ) == "item_id,published_at,source_type,source_url,author,text\n "
238218 payload = json .loads (status .read_text (encoding = "utf-8" ))
219+ assert payload ["feeds" ][0 ]["kind" ] == "rss"
239220 assert payload ["quarantined_feed_count" ] == 1
240221 assert payload ["accepted_row_count" ] == 0
241222 assert payload ["publication_complete" ] is False
0 commit comments