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
This commit is contained in:
parent
e516dc7925
commit
6d28eb180e
File diff suppressed because it is too large
Load diff
|
@ -100,11 +100,12 @@ img.hidden { display: none; }
|
|||
|
||||
|
||||
<div id="ietf-login" class="noprint">
|
||||
<a href="https://grenache.tools.ietf.org:31416/accounts/login/?next=/meeting/83/agenda-utc.html" rel="nofollow">Sign In</a>
|
||||
<a href="https://testserver/accounts/login/?next=/meeting/83/agenda-utc.html" rel="nofollow">Sign In</a>
|
||||
</div>
|
||||
|
||||
|
||||
<table style="margin-left:8px;margin-top:8px;" width="98%;">
|
||||
|
||||
<table style="margin-left:8px;margin-top:8px; width:98%;" id="ietf_menubar">
|
||||
<tr valign="top">
|
||||
<td style="width:130px;padding-right:8px;" class="noprint">
|
||||
<div class="ietf-navbar">
|
||||
|
@ -304,7 +305,7 @@ img.hidden { display: none; }
|
|||
|
||||
|
||||
|
||||
<li><a href="http://grenache.tools.ietf.org:31416/accounts/login/?next=/meeting/83/agenda-utc.html" rel="nofollow">Sign in to track drafts</a></li>
|
||||
<li><a href="http://testserver/accounts/login/?next=/meeting/83/agenda-utc.html" rel="nofollow">Sign in to track drafts</a></li>
|
||||
|
||||
|
||||
|
||||
|
@ -11698,7 +11699,7 @@ You can customize the agenda below to show only selected working group sessions.
|
|||
|
||||
|
||||
|
||||
<script type="text/javascript" src="/js/lib/jquery-1.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/lib/jquery-1.8.2.min.js"></script>
|
||||
<script type="text/javascript" src="/js/yui/yui-20100305.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
@ -11713,11 +11714,12 @@ YAHOO.util.Event.onContentReady("wgs", function () {
|
|||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ietf-extras"></div>
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
|
|
@ -99,7 +99,8 @@ img.hidden { display: none; }
|
|||
</div>
|
||||
|
||||
|
||||
<table style="margin-left:8px;margin-top:8px;" width="98%;">
|
||||
|
||||
<table style="margin-left:8px;margin-top:8px; width:98%;" id="ietf_menubar">
|
||||
<tr valign="top">
|
||||
<td style="width:130px;padding-right:8px;" class="noprint">
|
||||
<div class="ietf-navbar">
|
||||
|
@ -11643,11 +11644,12 @@ YAHOO.util.Event.onContentReady("wgs", function () {
|
|||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ietf-extras"></div>
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import re
|
||||
|
||||
from ietf.utils.test_utils import SimpleUrlTestCase, canonicalize_feed
|
||||
|
||||
|
@ -7,6 +8,8 @@ class MeetingUrlTestCase(SimpleUrlTestCase):
|
|||
def doCanonicalize(self, url, content):
|
||||
if url.startswith("/feed/"):
|
||||
return canonicalize_feed(content)
|
||||
else:
|
||||
return content
|
||||
if "agenda" in url:
|
||||
content = re.sub("<!-- v.*-->","", content)
|
||||
content = re.sub('<a href="/release/.*?</a>','', content)
|
||||
return content
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
200 /meeting/83/agenda.ics?APP,-~Other,-~Plenary
|
||||
200 /meeting/83/agenda.html ietf/meeting/tests/agenda-83.html.good
|
||||
200 /meeting/83/agenda-utc.html ietf/meeting/tests/agenda-83-utc.html.good
|
||||
200 /meeting/83/agenda.txt ietf/meeting/tests/agenda-83.txt.good
|
||||
200,skipdiff /meeting/83/rooms
|
||||
200,skipdiff /meeting/83/room/206.json
|
||||
200,skipdiff /meeting/83/timeslots
|
||||
|
|
|
@ -35,30 +35,6 @@ class ViewTestCase(TestCase):
|
|||
out.close()
|
||||
self.assertEqual(resp.content, agenda83txt, "The /meeting/83/agenda.txt page changed.\nThe newly generated agenda has been written to file: %s" % fn)
|
||||
|
||||
def test_agenda83utc(self):
|
||||
# verify that the generated html has not changed.
|
||||
import io
|
||||
agenda83utcio = open("%s/meeting/tests/agenda-83-utc-output.html" % BASE_DIR, "r")
|
||||
agenda83utc_valid = agenda83utcio.read(); # read entire file
|
||||
resp = self.client.get('/meeting/83/agenda-utc.html')
|
||||
# both agendas will have a software version indication inside a
|
||||
# comment. This will change. Remove comments before comparing.
|
||||
agenda83utc_valid = re.sub("<!-- v.*-->","", agenda83utc_valid)
|
||||
agenda83utc_valid = re.sub('<a href="/release/.*?</a>','', agenda83utc_valid)
|
||||
|
||||
agenda83utc_response = resp.content
|
||||
agenda83utc_response = re.sub("<!-- v.*-->","", agenda83utc_response)
|
||||
agenda83utc_response = re.sub('<a href="/release/.*</a>','', agenda83utc_response)
|
||||
|
||||
fn = ""
|
||||
# to capture new output (and check it for correctness)
|
||||
if agenda83utc_valid != agenda83utc_response:
|
||||
fn = "%s/meeting/tests/agenda-83-utc-output-out.html" % BASE_DIR
|
||||
out = open(fn, "w")
|
||||
out.write(resp.content)
|
||||
out.close()
|
||||
self.assertEqual(agenda83utc_valid, agenda83utc_response, "The /meeting/83/agenda-utc.html page changed.\nThe newly generated agenda has been written to file: %s" % fn)
|
||||
|
||||
def test_nameOfClueWg(self):
|
||||
clue_session = Session.objects.get(pk=2194)
|
||||
self.assertEqual(clue_session.short_name, "clue")
|
||||
|
|
Loading…
Reference in a new issue