Skip to content

Commit b312884

Browse files
committed
Renamed the AUTH48 state_alert_badge() filter to auth48_alert_badge(), as the filter is specific, not generic.
- Legacy-Id: 18439
1 parent 5a64d60 commit b312884

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

ietf/doc/templatetags/ballot_icon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def state_age_colored(doc):
220220
return ""
221221

222222
@register.filter
223-
def state_alert_badge(doc):
223+
def auth48_alert_badge(doc):
224224
"""Return alert badge, if any, for a document"""
225225
if doc.type_id != 'draft':
226226
return ''
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
from ietf.doc.factories import WgDraftFactory
2-
from ietf.doc.templatetags.ballot_icon import state_alert_badge
2+
from ietf.doc.templatetags.ballot_icon import auth48_alert_badge
33
from ietf.utils.test_utils import TestCase
44

55

66
class BallotIconTests(TestCase):
7-
def test_state_alert_badge_marks_auth48(self):
7+
def test_auth48_alert_badge_marks_auth48(self):
88
draft = WgDraftFactory(states=[
99
('draft','active'),
1010
('draft-iesg','rfcqueue'),
1111
('draft-rfceditor', 'auth48'),
1212
])
13-
output = state_alert_badge(draft)
13+
output = auth48_alert_badge(draft)
1414
self.assertIn('AUTH48', output)
1515

16-
def test_state_alert_badge_ignores_others(self):
17-
# If the state_alert_badge() method becomes more complicated, more
16+
def test_auth48_alert_badge_ignores_others(self):
17+
# If the auth48_alert_badge() method becomes more complicated, more
1818
# sophisticated testing can be added.
1919
# For now, just test a couple states that should not be marked.
2020
draft = WgDraftFactory(states=[
2121
('draft', 'active'),
2222
('draft-iesg', 'approved'), # not in rfcqueue state
2323
('draft-rfceditor', 'auth48'),
2424
])
25-
output = state_alert_badge(draft)
25+
output = auth48_alert_badge(draft)
2626
self.assertEqual('', output)
2727

2828
draft = WgDraftFactory(states=[
2929
('draft', 'active'),
3030
('draft-iesg', 'rfcqueue'),
3131
('draft-rfceditor', 'auth48-done'), # not in auth48 state
3232
])
33-
output = state_alert_badge(draft)
33+
output = auth48_alert_badge(draft)
3434
self.assertEqual('', output)

ietf/doc/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def test_auth48_doc_for_ad(self):
261261
kwargs=dict(name=ad.full_name_as_key())))
262262
self.assertEqual(r.status_code, 200)
263263
self.assertContains(r, draft.name)
264-
self.assertContains(r, 'title="AUTH48"') # title attribute of AUTH48 badge in state_alert_badge filter
264+
self.assertContains(r, 'title="AUTH48"') # title attribute of AUTH48 badge in auth48_alert_badge filter
265265

266266
def test_drafts_in_last_call(self):
267267
draft = IndividualDraftFactory(pages=1)

ietf/templates/doc/search/status_columns.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<wbr>: <a href="https://www.rfc-editor.org/queue2.html#{{ doc.name }}">{{ doc|state:"draft-rfceditor" }}</a>
1818
{% endif %}
1919

20-
<wbr>{{ doc|state_alert_badge }}
20+
<wbr>{{ doc|auth48_alert_badge }}
2121

2222
<wbr>{{ doc|state_age_colored }}
2323

0 commit comments

Comments
 (0)