pagerdudy -> pagerduty

(imported from commit 7cd25db67a8b20875edceafe881c872061a48fab)
This commit is contained in:
Leo Franchi 2015-02-10 07:25:46 +00:00
parent 2bb268476e
commit 64a0b86917
2 changed files with 5 additions and 5 deletions

View File

@ -811,7 +811,7 @@ class PagerDutyHookTests(AuthedTestCase):
self.assertEqual(msg.subject, 'pagerduty')
self.assertEqual(
msg.content,
'Unknown pagerdudy message\n``` py\n{u\'type\': u\'incident.triggered\'}\n```'
'Unknown pagerduty message\n``` py\n{u\'type\': u\'incident.triggered\'}\n```'
)
def test_unknown_message_type(self):
@ -820,5 +820,5 @@ class PagerDutyHookTests(AuthedTestCase):
self.assertEqual(msg.subject, 'pagerduty')
self.assertEqual(
msg.content,
'Unknown pagerdudy message\n``` py\n{u\'type\': u\'foo\'}\n```'
'Unknown pagerduty message\n``` py\n{u\'type\': u\'foo\'}\n```'
)

View File

@ -927,7 +927,7 @@ PAGER_DUTY_EVENT_NAMES = {
'incident.delegate': 'delineated',
}
def build_pagerdudy_formatdict(message):
def build_pagerduty_formatdict(message):
# Normalize the message dict, after this all keys will exist. I would
# rather some strange looking messages than dropping pages.
@ -975,7 +975,7 @@ def build_pagerdudy_formatdict(message):
def send_raw_pagerduty_json(user_profile, stream, message):
subject = 'pagerduty'
body = (
u'Unknown pagerdudy message\n'
u'Unknown pagerduty message\n'
u'``` py\n'
u'%s\n'
u'```') % (pprint.pformat(message),)
@ -1020,7 +1020,7 @@ def api_pagerduty_webhook(request, user_profile, stream=REQ(default='pagerduty')
send_raw_pagerduty_json(user_profile, stream, message)
try:
format_dict = build_pagerdudy_formatdict(message)
format_dict = build_pagerduty_formatdict(message)
except:
send_raw_pagerduty_json(user_profile, stream, message)
else: