| |
@@ -393,6 +393,28 @@
|
| |
mock_github.assert_not_called()
|
| |
self.assertEqual(None, response)
|
| |
|
| |
+ @mock.patch(PATH + 'Github')
|
| |
+ @mock.patch('sync2jira.intermediary.Issue.from_github')
|
| |
+ def test_handle_github_message_pull_request(self,
|
| |
+ mock_issue_from_github,
|
| |
+ mock_github):
|
| |
+ """
|
| |
+ This function tests 'handle_github_message' the issue is a pull request comment
|
| |
+ """
|
| |
+ # Set up return values
|
| |
+ self.mock_github_message['msg']['issue'] = {'pull_request': 'test'}
|
| |
+
|
| |
+ # Call the function
|
| |
+ response = u.handle_github_message(
|
| |
+ msg=self.mock_github_message,
|
| |
+ config=self.mock_config
|
| |
+ )
|
| |
+
|
| |
+ # Assert that all calls were made correctly
|
| |
+ mock_issue_from_github.assert_not_called()
|
| |
+ mock_github.assert_not_called()
|
| |
+ self.assertEqual(None, response)
|
| |
+
|
| |
@mock.patch('sync2jira.intermediary.Issue.from_github')
|
| |
def test_handle_github_message_bad_filter(self,
|
| |
mock_issue_from_github):
|
| |