4
4
5
5
from openedx_webhooks .bot_comments import (
6
6
BotComment ,
7
- is_comment_kind ,
8
7
)
9
8
from openedx_webhooks .cla_check import (
10
9
CLA_CONTEXT ,
@@ -52,16 +51,6 @@ def closed_pull_request(is_merged, fake_github, fake_jira):
52
51
return pr
53
52
54
53
55
- def test_external_pr_closed (fake_jira , closed_pull_request ):
56
- pr = closed_pull_request
57
- pull_request_changed (pr .as_json ())
58
-
59
- pr_comments = pr .list_comments ()
60
- body = pr_comments [- 1 ].body
61
- assert "survey" in body
62
- assert is_comment_kind (BotComment .SURVEY , body )
63
-
64
-
65
54
def test_external_pr_closed_but_issue_deleted (fake_jira , closed_pull_request ):
66
55
# A closing pull request, but its Jira issue has been deleted.
67
56
pr = closed_pull_request
@@ -70,7 +59,7 @@ def test_external_pr_closed_but_issue_deleted(fake_jira, closed_pull_request):
70
59
assert not result .jira_issues
71
60
72
61
pr_comments = pr .list_comments ()
73
- assert len (pr_comments ) == 4 # 1 welcome, closed_pull_request makes two, 1 survey
62
+ assert len (pr_comments ) == 3 # 1 welcome, closed_pull_request makes two
74
63
# We leave the old issue id in the comment.
75
64
body = pr_comments [0 ].body
76
65
check_issue_link_in_markdown (body , None )
@@ -98,13 +87,13 @@ def test_cc_pr_closed(fake_github, fake_jira, is_merged):
98
87
pull_request_changed (pr .as_json ())
99
88
100
89
pr_comments = pr .list_comments ()
101
- assert len (pr_comments ) == 2 # 1 welcome, 1 survey
90
+ assert len (pr_comments ) == 1 # welcome comment
102
91
103
92
# Processing it again won't change anything.
104
93
pull_request_changed (pr .as_json ())
105
94
106
95
pr_comments = pr .list_comments ()
107
- assert len (pr_comments ) == 2 # 1 welcome, 1 survey
96
+ assert len (pr_comments ) == 1 # welcome comment
108
97
109
98
110
99
@pytest .mark .parametrize ("org" , ["openedx" , "edx" ])
0 commit comments