Skip to content

Commit f2f5299

Browse files
committed
Make it configurable which host (and path prefix) we'll use to retrieve legacy page content for diff testing. Add a setting in settings.py pointing to http://compost.research.att.com/old/.
- Legacy-Id: 767
1 parent f24d1b5 commit f2f5299

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

ietf/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@
157157

158158
IPR_DOCUMENT_PATH = '/home/master-site/ftp/data/ietf/IPR'
159159

160+
TEST_REFERENCE_URL_PREFIX = 'http://compost.research.att.com/old/'
161+
160162
# Put SECRET_KEY in here, or any other sensitive or site-specific
161163
# changes. DO NOT commit settings_local.py to svn.
162164
from settings_local import *

ietf/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ def read_testurls(filename):
9090
goodurl = None
9191
elif len(urlspec) == 3:
9292
codes, testurl, goodurl = urlspec
93+
# strip protocol and host -- we're making that configurable
94+
goodurl = re.sub("^https?://[a-z0-9.]/", "", goodurl)
9395
else:
9496
raise ValueError("Expected 'HTTP_CODE TESTURL [GOODURL]' in %s line, found '%s'." % (filename, line))
9597

0 commit comments

Comments
 (0)