def test_format_descr_wo_notes(self):
"""
Tests the _format_description method when the alert has no notes.
"""
self.mock_settings['INCLUDE_FULL_DESCRIPTION'] = False
with patch('ambassador.transport.Transport.get_key_cert',
return_value=self.mock_cert):
with patch('platforms.jira.handlers.jira.JIRA',
return_value=self.mock_auth):
with patch.dict('platforms.jira.handlers.settings.JIRA',
self.mock_settings):
handler_w_user = IssueAPI(endpoint=self.endpoint,
user=self.user)
alert = Alert.objects.get(pk=2)
actual = handler_w_user._format_description(alert)
expected = ''
self.assertEqual(actual, expected)
评论列表
文章目录