Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions ietf/doc/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,6 @@ def item_extra_kwargs(self, item):
"is_format_of": self.item_link(item),
}
)
if item.rfc_number not in [571, 587]:
media_contents.append(
{
"url": f"https://www.rfc-editor.org/rfc/pdfrfc/{item.name}.txt.pdf",
"media_type": "application/pdf",
"is_format_of": self.item_link(item),
}
)
else:
media_contents.append(
{
Expand Down
4 changes: 2 additions & 2 deletions ietf/doc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2093,9 +2093,9 @@ def test_rfc_feed(self):
self.assertEqual(len(q("item")), 3)
item = q("item")[0]
media_content = item.findall("{http://search.yahoo.com/mrss/}content")
self.assertEqual(len(media_content), 3)
self.assertEqual(len(media_content), 2)
types = set([m.attrib["type"] for m in media_content])
self.assertEqual(types, set(["text/plain", "text/html", "application/pdf"]))
self.assertEqual(types, set(["text/plain", "text/html"]))

def test_state_help(self):
url = urlreverse('ietf.doc.views_help.state_help', kwargs=dict(type="draft-iesg"))
Expand Down
3 changes: 0 additions & 3 deletions ietf/doc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,6 @@ def build_file_urls(doc: Union[Document, DocHistory]):
label = "plain text" if t == "txt" else t
file_urls.append((label, base + doc.name + "." + t))

if "pdf" not in found_types and "txt" in found_types:
file_urls.append(("pdf", base + "pdfrfc/" + doc.name + ".txt.pdf"))

if "txt" in found_types:
file_urls.append(("htmlized", urlreverse('ietf.doc.views_doc.document_html', kwargs=dict(name=doc.name))))
if doc.tags.filter(slug="verified-errata").exists():
Expand Down
12 changes: 8 additions & 4 deletions ietf/sync/tests_rfcindex.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright The IETF Trust 2026, All Rights Reserved
import json
import re
from pathlib import Path
from unittest import mock

Expand Down Expand Up @@ -131,17 +132,20 @@ def test_create_rfc_txt_index(self, mock_save_blob, mock_save_file):
"0123 Not Issued.",
contents,
)

# strip whitespace so line breaks don't interfere with the next few tests
stripped_contents = re.sub(r"\s+", " ", mock_save_blob.call_args[0][1])
self.assertIn(
f"{self.april_fools_rfc.rfc_number} {self.april_fools_rfc.title}",
contents,
stripped_contents,
)
self.assertIn("1 April 2020", contents) # from the April 1 RFC
self.assertIn(
f"{self.rfc.rfc_number} {self.rfc.title}",
contents,
stripped_contents,
)
self.assertIn("April 2021", contents) # from the non-April 1 RFC
self.assertNotIn("1 April 2021", contents)
self.assertIn("April 2021", stripped_contents) # from the non-April 1 RFC
self.assertNotIn("1 April 2021", stripped_contents)

@override_settings(RFCINDEX_INPUT_PATH="input/")
@mock.patch("ietf.sync.rfcindex.save_to_filesystem")
Expand Down
Loading