From b4b14112b8c3dde146755150be6b2883ba40d2b3 Mon Sep 17 00:00:00 2001 From: Russ Housley Date: Fri, 12 Feb 2016 22:09:13 +0000 Subject: [PATCH] Added test for proper eneration of the approval message with and without an RFC Editor Note. - Legacy-Id: 10839 --- ietf/doc/tests_ballot.py | 15 +++++++++++++++ ietf/templates/doc/document_draft.html | 10 +++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ietf/doc/tests_ballot.py b/ietf/doc/tests_ballot.py index 68f4b4887..fbfce2915 100644 --- a/ietf/doc/tests_ballot.py +++ b/ietf/doc/tests_ballot.py @@ -478,6 +478,21 @@ class ApproveBallotTests(TestCase): q = PyQuery(r.content) self.assertTrue(q('[type=submit]:contains("send announcement")')) self.assertEqual(len(q('form pre:contains("Subject: Protocol Action")')), 1) + self.assertEqual(len(q('form pre:contains("This is a note for the RFC Editor")')), 0) + + # add a note to the RFC Editor + WriteupDocEvent.objects.create( + doc=draft, + desc="Changed text", + type="changed_rfc_editor_note_text", + text="This is a note for the RFC Editor.", + by=Person.objects.get(name="(System)")) + r = self.client.get(url) + self.assertEqual(r.status_code, 200) + q = PyQuery(r.content) + self.assertTrue(q('[type=submit]:contains("send announcement")')) + self.assertEqual(len(q('form pre:contains("Subject: Protocol Action")')), 1) + self.assertEqual(len(q('form pre:contains("This is a note for the RFC Editor")')), 1) # approve mailbox_before = len(outbox) diff --git a/ietf/templates/doc/document_draft.html b/ietf/templates/doc/document_draft.html index ba6535058..00f227add 100644 --- a/ietf/templates/doc/document_draft.html +++ b/ietf/templates/doc/document_draft.html @@ -200,7 +200,7 @@ {% if doc.stream.slug != "legacy" %} - {% if doc.stream.slug == "ietf" %} WG {% else %} {{ doc.stream }} {% endif %} state + {% if doc.stream_id == 'ietf' %} WG {% else %} {{ doc.stream }} {% endif %} state {% else %} Legacy state @@ -229,7 +229,7 @@ {% endif %} - {% if consensus and not stream_state_type_slug == "draft-stream-ietf" %} + {% if consensus and not doc.stream_id == 'ietf' %} Consensus @@ -264,7 +264,7 @@ {% endif %} - {% if stream_state_type_slug == "draft-stream-ietf" %} + {% if doc.stream_id == 'ietf' %} Document shepherd @@ -325,7 +325,7 @@ - {% if not stream_state_type_slug == "draft-stream-iab" %} + {% if not doc.stream_id == 'iab' %} IESG @@ -340,7 +340,7 @@ - {% if consensus and stream_state_type_slug == "draft-stream-ietf" %} + {% if consensus and doc.stream_id == 'ietf' %} Consensus