Skip to content

Commit

Permalink
fix: correct label for objectively false ipr disclosures (#8101)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks authored Oct 28, 2024
1 parent e72c365 commit 94f95c0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
26 changes: 22 additions & 4 deletions ietf/ipr/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
GenericIprDisclosureFactory,
IprDisclosureBaseFactory,
IprDocRelFactory,
IprEventFactory
IprEventFactory,
ThirdPartyIprDisclosureFactory
)
from ietf.ipr.forms import DraftForm, HolderIprDisclosureForm
from ietf.ipr.mail import (process_response_email, get_reply_to, get_update_submitter_emails,
Expand Down Expand Up @@ -104,9 +105,26 @@ def test_get_update_submitter_emails(self):
self.assertTrue(messages[0].startswith('To: %s' % ipr.submitter_email))

def test_showlist(self):
ipr = HolderIprDisclosureFactory()
r = self.client.get(urlreverse("ietf.ipr.views.showlist"))
self.assertContains(r, ipr.title)
for disc_factory_type in (HolderIprDisclosureFactory, GenericIprDisclosureFactory, ThirdPartyIprDisclosureFactory):
ipr = disc_factory_type(state_id="removed")
r = self.client.get(urlreverse("ietf.ipr.views.showlist"))
self.assertContains(r, ipr.title)
self.assertContains(r, "removed at the request of the submitter")
self.assertNotContains(r, "removed as objectively false")
ipr.state_id="posted"
ipr.save()
r = self.client.get(urlreverse("ietf.ipr.views.showlist"))
self.assertContains(r, ipr.title)
self.assertNotContains(r, "removed at the request of the submitter")
self.assertNotContains(r, "removed as objectively false")
ipr.state_id="removed_objfalse"
ipr.save()
r = self.client.get(urlreverse("ietf.ipr.views.showlist"))
self.assertContains(r, ipr.title)
self.assertNotContains(r, "removed at the request of the submitter")
self.assertContains(r, "removed as objectively false")
ipr.delete()


def test_show_posted(self):
ipr = HolderIprDisclosureFactory()
Expand Down
7 changes: 5 additions & 2 deletions ietf/templates/ipr/ipr_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
</small>
{% endif %}
{% endfor %}
{% else %}
{% elif ipr.state_id == 'removed' %}
<div>{{ ipr.title }}</div>
<small><i>This IPR disclosure was removed at the request of the submitter.</i></small>
{% endif %}
{% elif ipr.state_id == 'removed_objfalse' %}
<div>{{ ipr.title }}</div>
<small><i>This IPR disclosure was removed as objectively false.</i></small>
{% endif %} {# Intentionally not emitting anything for any other states #}
</td>
{% if administrative_list == 'pending' %}
{% with ipr.get_latest_event_msgout as latest_msgout %}
Expand Down

0 comments on commit 94f95c0

Please sign in to comment.