Changed a function name.

- Legacy-Id: 16386
This commit is contained in:
Henrik Levkowetz 2019-07-04 16:10:21 +00:00
parent 81fa6dc962
commit a1e7dc9acc
3 changed files with 9 additions and 8 deletions

View file

@ -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')

View file

@ -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)

View file

@ -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' %}
<a class="btn btn-primary" href="{% url 'ietf.doc.views_conflict_review.approve' name=doc.name %}">Approve conflict review</a>
<a class="btn btn-primary" href="{% url 'ietf.doc.views_conflict_review.approve_conflict_review' name=doc.name %}">Approve conflict review</a>
{% endif %}
{% endif %}
{% endif %}