webhooks/basecamp: Add support for todo_uncompleted event type.

We have a fixture for this event in the repo, but the event was not listed
in the supported event types list. It is also documented in the Basecamp API
docs here:
https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md
This commit is contained in:
Puneeth Chaganti
2020-04-17 16:22:28 +05:30
committed by Tim Abbott
parent 01efb351d5
commit 97792466ec
2 changed files with 5 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ TODOS_SUPPORT_EVENTS = [
'todolist_name_changed',
'todo_assignment_changed',
'todo_completed',
'todo_uncompleted',
'todo_created',
'todo_due_on_changed',
]

View File

@@ -119,6 +119,10 @@ class BasecampHookTests(WebhookTestCase):
expected_message = "Tomasz completed the todo task [New task](https://3.basecamp.com/3688623/buckets/2957043/todos/427055624)."
self._send_and_test_message('todo_completed', expected_message)
def test_basecamp_makes_todo_uncompleted(self) -> None:
expected_message = "Tomasz uncompleted the todo task [New task](https://3.basecamp.com/3688623/buckets/2957043/todos/427055624)."
self._send_and_test_message('todo_uncompleted', expected_message)
def test_basecamp_makes_todo_created(self) -> None:
expected_message = "Tomasz created the todo task [New task](https://3.basecamp.com/3688623/buckets/2957043/todos/427055624)."
self._send_and_test_message('todo_created', expected_message)