datatracker/ietf/meeting/tests/meetingurls.py
Henrik Levkowetz 6d28eb180e Replaced the handcoded agenda-83.txt test with one using the testurl
framework, moving the known-good master to a name matching the others
mentioned in testurl.list.
 - Legacy-Id: 6438
2013-10-13 20:41:12 +00:00

16 lines
491 B
Python

import re
from ietf.utils.test_utils import SimpleUrlTestCase, canonicalize_feed
class MeetingUrlTestCase(SimpleUrlTestCase):
def testUrls(self):
self.doTestUrls(__file__)
def doCanonicalize(self, url, content):
if url.startswith("/feed/"):
return canonicalize_feed(content)
if "agenda" in url:
content = re.sub("<!-- v.*-->","", content)
content = re.sub('<a href="/release/.*?</a>','', content)
return content