webhooks/gci: Support "unassign" event type.

This commit adds support for the "unassign" event type, the
payloads for which are generated when a mentor unassigns a student
from a task.
This commit is contained in:
Eeshan Garg
2018-01-02 17:49:34 -03:30
committed by showell
parent 2c7f4d2187
commit 18c3bec667
3 changed files with 27 additions and 0 deletions

View File

@@ -55,3 +55,9 @@ class GoogleCodeInTests(WebhookTestCase):
expected_message = u'**eeshangarg** extended the deadline for the task [Sails unspread it stopped at kearney](https://codein.withgoogle.com/dashboard/task-instances/6296903092273152/) by 1.0 day(s).'
self.send_and_test_stream_message('task_deadline_extended_by_mentor',
expected_subject, expected_message)
def test_unassign_event_message(self) -> None:
expected_subject = u'student-yqqtag'
expected_message = u'**eeshangarg** unassigned **student-yqqtag** from the task [Sails unspread it stopped at kearney](https://codein.withgoogle.com/dashboard/task-instances/6296903092273152/).'
self.send_and_test_stream_message('student_unassigned_by_mentor',
expected_subject, expected_message)