Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: attendance uses plain_name() #7198

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ietf/meeting/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8598,7 +8598,7 @@ def test_session_attendance(self):
self.assertEqual(r.status_code, 200)
self.assertContains(r, '3 attendees')
for person in persons:
self.assertContains(r, person.name)
self.assertContains(r, person.plain_name())

# Test for the "I was there" button.
def _test_button(person, expected):
Expand All @@ -8618,14 +8618,14 @@ def _test_button(person, expected):
# attempt to POST anyway is ignored
r = self.client.post(attendance_url)
self.assertEqual(r.status_code, 200)
self.assertNotContains(r, persons[3].name)
self.assertNotContains(r, persons[3].plain_name())
self.assertEqual(session.attended_set.count(), 3)
# button is shown, and POST is accepted
meeting.importantdate_set.update(name_id='revsub',date=date_today() + datetime.timedelta(days=20))
_test_button(persons[3], True)
r = self.client.post(attendance_url)
self.assertEqual(r.status_code, 200)
self.assertContains(r, persons[3].name)
self.assertContains(r, persons[3].plain_name())
self.assertEqual(session.attended_set.count(), 4)

# When the meeting is finalized, a bluesheet file is generated,
Expand All @@ -8639,7 +8639,7 @@ def _test_button(person, expected):
text = doc.text()
self.assertIn('4 attendees', text)
for person in persons:
self.assertIn(person.name, text)
self.assertIn(person.plain_name(), text)
r = self.client.get(session_url)
self.assertContains(r, doc.get_href())
self.assertNotContains(r, attendance_url)
Expand Down
Loading