2023-10-12 19:43:45 +02:00
from typing_extensions import override
2016-11-10 19:30:09 +01:00
from zerver . lib . test_classes import WebhookTestCase
2016-09-20 22:51:11 +02:00
2020-01-14 22:06:24 +01:00
2016-09-20 22:51:11 +02:00
class TaigaHookTests ( WebhookTestCase ) :
2021-02-12 08:20:45 +01:00
STREAM_NAME = " taiga "
2024-01-17 15:53:30 +01:00
TOPIC_NAME = " subject "
2020-04-09 21:51:58 +02:00
URL_TEMPLATE = " /api/v1/external/taiga?stream= {stream} &api_key= {api_key} "
2021-06-26 09:18:33 +02:00
WEBHOOK_DIR_NAME = " taiga "
2016-09-20 22:51:11 +02:00
2023-10-12 19:43:45 +02:00
@override
2017-11-04 07:47:46 +01:00
def setUp ( self ) - > None :
2019-10-19 20:47:00 +02:00
super ( ) . setUp ( )
2024-01-17 15:53:30 +01:00
self . url = self . build_webhook_url ( topic = self . TOPIC_NAME )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_deleted ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) deleted user story **New userstory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_deleted " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_created ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) created user story **New userstory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_created " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_unblocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) unblocked user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_unblocked " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_subject ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) renamed user story from UserStory to **UserStoryNewSubject**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_subject " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_status ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed status of user story **UserStory** from Ready to In progress. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_status " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_reassigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) reassigned user story **UserStory** from TomaszKolek to HanSolo. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_reassigned " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_unassigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) unassigned user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_unassigned " , self . TOPIC_NAME , message )
2017-01-10 19:22:26 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_points ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed estimation of user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_points " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_new_sprint ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) added user story **UserStory** to sprint Sprint1. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_new_sprint " , self . TOPIC_NAME , message )
2017-01-10 19:22:26 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_sprint ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed sprint of user story **UserStory** from Sprint1 to Sprint2. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_sprint " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_remove_sprint ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) removed user story **UserStory** from sprint Sprint2. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_remove_sprint " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_description ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) updated description of user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_description " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_closed ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed status of user story **UserStory** from New to Done. \n [TomaszKolek](https://tree.taiga.io/profile/kolaszek) closed user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_closed " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_reopened ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed status of user story **UserStory** from Done to Ready. \n [TomaszKolek](https://tree.taiga.io/profile/kolaszek) reopened user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_reopened " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_blocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) blocked user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_blocked " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_changed_assigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) assigned user story **UserStory** to TomaszKolek. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_assigned " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_userstory_comment_added ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) commented on user story **UserStory**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_comment_added " , self . TOPIC_NAME , message )
2017-01-10 19:22:26 +01:00
2020-01-30 18:12:21 +01:00
def test_taiga_userstory_changed_due_date ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2023-01-03 02:16:53 +01:00
" [Aditya Verma](https://tree.taiga.io/profile/orientor) changed due date of user story "
" [Nice Issue](https://tree.taiga.io/project/orientor-sd/us/54) from 2020-02-15 to "
" 2020-02-22. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_due_date " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_userstory_changed_new_due_date ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) set due date of user story [random](https://tree.taiga.io/project/orientor-sd/us/58) to 2020-02-15. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " userstory_changed_new_due_date " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_created ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) created task **New Task**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_created " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2018-10-16 20:46:22 +02:00
def test_taiga_task_changed_user_stories ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) added task **Get this task done** to sprint Another one. \n [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) moved task **Get this task done** from user story #7 Yaar ne scirra! to #8 A related user story, which is epic. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_user_stories " , self . TOPIC_NAME , message )
2018-10-16 20:46:22 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_status ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed status of task **New Task** from New to In progress. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_status " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_blocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) blocked task **New Task**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_blocked " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2020-01-30 18:12:21 +01:00
def test_taiga_task_changed_blocked_link ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) blocked task [nice task](https://tree.taiga.io/project/orientor-sd/task/56). "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_blocked_link " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_unblocked ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [TomaszKolek](https://tree.taiga.io/profile/kolaszek) unblocked task **New Task**. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_unblocked " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_assigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) assigned task **New Task** to TomaszKolek. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_assigned " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_reassigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) reassigned task **New Task** from HanSolo to TomaszKolek. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_reassigned " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_subject ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) renamed task New Task to **New Task Subject**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_subject " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_description ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) updated description of task **New Task**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_description " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_deleted ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) deleted task **New Task**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_deleted " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_task_changed_comment_added ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [TomaszKolek](https://tree.taiga.io/profile/kolaszek) commented on task **New Task**. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_comment_added " , self . TOPIC_NAME , message )
2017-01-10 19:22:26 +01:00
2020-01-30 18:12:21 +01:00
def test_taiga_task_changed_due_date ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [Aditya Verma](https://tree.taiga.io/profile/orientor) changed due date of task "
2023-01-03 02:16:53 +01:00
" [nice task](https://tree.taiga.io/project/orientor-sd/task/56) from 2020-02-22 to "
" 2020-02-15. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_due_date " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_task_changed_new_due_date ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) set due date of task [nice task](https://tree.taiga.io/project/orientor-sd/task/56) to 2020-02-22. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " task_changed_new_due_date " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_sprint_created ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [TomaszKolek](https://tree.taiga.io/profile/kolaszek) created sprint **New sprint**. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " sprint_created " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_sprint_deleted ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [TomaszKolek](https://tree.taiga.io/profile/kolaszek) deleted sprint **New name**. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " sprint_deleted " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_sprint_changed_time ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed estimated finish of sprint **New sprint** from 2017-01-24 to 2017-01-25. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " sprint_changed_time " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_sprint_changed_name ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) renamed sprint from New sprint to **New name**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " sprint_changed_name " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_created ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [TomaszKolek](https://tree.taiga.io/profile/kolaszek) created issue **New issue**. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_created " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2020-01-30 18:12:21 +01:00
def test_taiga_issue_created_link ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) created issue [Issues](https://tree.taiga.io/project/orientor-sd/issue/49). "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_created_link " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_deleted ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [TomaszKolek](https://tree.taiga.io/profile/kolaszek) deleted issue **New issue**. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_deleted " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_assigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) assigned issue **New issue** to TomaszKolek. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_assigned " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_reassigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) reassigned issue **New issue** from TomaszKolek to HanSolo. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_reassigned " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_subject ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) renamed issue New issue to **New issueNewSubject**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_subject " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_description ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) updated description of issue **New issue**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_description " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_type ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed type of issue **New issue** from Bug to Question. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_type " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_status ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed status of issue **New issue** from New to In progress. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_status " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_severity ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed severity of issue **New issue** from Normal to Minor. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_severity " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_priority ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) changed priority of issue **New issue** from Normal to Low. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_priority " , self . TOPIC_NAME , message )
2016-09-20 22:51:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_issue_changed_comment_added ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [TomaszKolek](https://tree.taiga.io/profile/kolaszek) commented on issue **New issue**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_comment_added " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2020-01-30 18:12:21 +01:00
def test_taiga_issue_changed_blocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) blocked issue [Issues](https://tree.taiga.io/project/orientor-sd/issue/49). "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_blocked " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_issue_changed_unblocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) unblocked issue [Issues](https://tree.taiga.io/project/orientor-sd/issue/49). "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_unblocked " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_issue_changed_due_date ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2023-01-03 02:16:53 +01:00
" [Aditya Verma](https://tree.taiga.io/profile/orientor) changed due date of issue "
" [Issues](https://tree.taiga.io/project/orientor-sd/issue/49) from 2020-03-08 to "
" 2020-02-22. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_due_date " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_issue_changed_new_due_date ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) set due date of issue [Nice Issue](https://tree.taiga.io/project/orientor-sd/issue/53) to 2020-02-22. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_new_due_date " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_issue_changed_new_sprint ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) added issue [Nice Issue](https://tree.taiga.io/project/orientor-sd/issue/53) to sprint eres. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_new_sprint " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
def test_taiga_issue_changed_remove_sprint ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Aditya Verma](https://tree.taiga.io/profile/orientor) detached issue [Nice Issue](https://tree.taiga.io/project/orientor-sd/issue/53) from sprint eres. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " issue_changed_remove_sprint " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_created ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) created epic **Zulip is awesome!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_created " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_assigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) assigned epic **Zulip is awesome!** to Eeshan Garg. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_assigned " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_unassigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) unassigned epic **Zulip is awesome!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_unassigned " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_reassigned ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) reassigned epic **Zulip is awesome!** from Eeshan Garg to Angela Johnson. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_reassigned " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_blocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) blocked epic **Zulip is awesome!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_blocked " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_unblocked ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) unblocked epic **Zulip is awesome!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_unblocked " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_status ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) changed status of epic **Zulip is awesome!** from New to In progress. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_status " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_renamed ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) renamed epic from **Zulip is awesome!** to **Zulip is great!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_renamed " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_description ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) updated description of epic **Zulip is great!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_description " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_changed_commented ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) commented on epic **Zulip is great!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_changed_commented " , self . TOPIC_NAME , message )
2017-10-22 05:30:45 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_epic_deleted ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) deleted epic **Zulip is great!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " epic_deleted " , self . TOPIC_NAME , message )
2017-10-25 03:31:11 +02:00
2017-11-04 07:47:46 +01:00
def test_taiga_relateduserstory_created ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) added a related user story **A related user story** to the epic **This is Epic!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " relateduserstory_created " , self . TOPIC_NAME , message )
2017-10-25 03:31:11 +02:00
2020-01-30 18:12:21 +01:00
def test_taiga_relateduserstory_created_link ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2023-01-03 02:16:53 +01:00
" [Aditya Verma](https://tree.taiga.io/profile/orientor) added a related user story "
" [Nice Issue](https://tree.taiga.io/project/orientor-sd/us/54) to the epic "
" [ASAS](https://tree.taiga.io/project/orientor-sd/epic/42). "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " relateduserstory_created_link " , self . TOPIC_NAME , message )
2020-01-30 18:12:21 +01:00
2017-11-04 07:47:46 +01:00
def test_taiga_relateduserstory_deleted ( self ) - > None :
2021-02-12 08:20:45 +01:00
message = " [Eeshan Garg](https://tree.taiga.io/profile/eeshangarg) removed a related user story **A related user story, which is epic** from the epic **This is Epic!**. "
2024-01-17 15:53:30 +01:00
self . check_webhook ( " relateduserstory_deleted " , self . TOPIC_NAME , message )
2019-10-27 17:40:01 +01:00
def test_taiga_webhook_test ( self ) - > None :
2021-02-12 08:19:30 +01:00
message = (
2021-02-12 08:20:45 +01:00
" [Jan](https://tree.taiga.io/profile/kostek) triggered a test of the Taiga integration. "
2021-02-12 08:19:30 +01:00
)
2024-01-17 15:53:30 +01:00
self . check_webhook ( " webhook_test " , self . TOPIC_NAME , message )