diff --git a/ietf/doc/tests_conflict_review.py b/ietf/doc/tests_conflict_review.py index f9f85a77d..112623652 100644 --- a/ietf/doc/tests_conflict_review.py +++ b/ietf/doc/tests_conflict_review.py @@ -18,7 +18,7 @@ from ietf.doc.views_conflict_review import default_approval_text from ietf.group.models import Person from ietf.iesg.models import TelechatDate from ietf.name.models import StreamName -from ietf.utils.test_utils import TestCase, unicontent +from ietf.utils.test_utils import TestCase from ietf.utils.mail import outbox, empty_outbox from ietf.utils.test_utils import login_testing_unauthorized @@ -265,7 +265,7 @@ class ConflictReviewTests(TestCase): def approve_test_helper(self,approve_type): doc = Document.objects.get(name='conflict-review-imaginary-irtf-submission') - url = urlreverse('ietf.doc.views_conflict_review.approve',kwargs=dict(name=doc.name)) + url = urlreverse('ietf.doc.views_conflict_review.approve_conflict_review',kwargs=dict(name=doc.name)) login_testing_unauthorized(self, "secretary", url) @@ -297,12 +297,13 @@ class ConflictReviewTests(TestCase): self.assertIn('irtf-chair', outbox[0]['To']) self.assertIn('ietf-announce@', outbox[0]['Cc']) self.assertIn('iana@', outbox[0]['Cc']) + if approve_type == 'appr-noprob': - self.assertContains(r, 'IESG has no problem') + self.assertIn( 'IESG has no problem', ''.join(wrap(outbox[0].get_payload(), 2**16))) else: - self.assertContains(r, 'NOT be published') - - + self.assertIn( 'NOT be published', ''.join(wrap(outbox[0].get_payload(), 2**16))) + + def test_approve_reqnopub(self): self.approve_test_helper('appr-reqnopub') diff --git a/ietf/doc/views_conflict_review.py b/ietf/doc/views_conflict_review.py index 518fd0d7a..0b741e6c3 100644 --- a/ietf/doc/views_conflict_review.py +++ b/ietf/doc/views_conflict_review.py @@ -301,7 +301,7 @@ class AnnouncementForm(forms.Form): announcement_text = forms.CharField(widget=forms.Textarea, label="IETF Conflict Review Announcement", help_text="Edit the announcement message.", required=True, strip=False) @role_required("Secretariat") -def approve(request, name): +def approve_conflict_review(request, name): """Approve this conflict review, setting the appropriate state and send the announcement to the right parties.""" review = get_object_or_404(Document, type="conflrev", name=name) diff --git a/ietf/templates/doc/document_conflict_review.html b/ietf/templates/doc/document_conflict_review.html index aa804d208..8e379890f 100644 --- a/ietf/templates/doc/document_conflict_review.html +++ b/ietf/templates/doc/document_conflict_review.html @@ -135,7 +135,7 @@ {% if not snapshot and user|has_role:"Area Director,Secretariat" %} {% if request.user|has_role:"Secretariat" %} {% if doc.get_state_slug == 'appr-reqnopub-pend' or doc.get_state_slug == 'appr-noprob-pend' %} - Approve conflict review + Approve conflict review {% endif %} {% endif %} {% endif %}