github webhooks: Fix message for unsupported team payloads.

The main thing fixed here is that we weren't turning
on our keys into a list.  And then I refined the message
a bit more, including sorting the keys.

I also avoid the unnecessary "else".
This commit is contained in:
Steve Howell
2020-09-02 12:23:52 +00:00
committed by Tim Abbott
parent 8785790a27
commit c6b9a23c17
2 changed files with 7 additions and 2 deletions

View File

@@ -452,4 +452,8 @@ A temporary team so that I can get some webhook fixtures!
stack_info = m.call_args[1]["stack_info"]
self.assertIn("content_type: application/json", msg)
self.assertIn(
"summary: The 'team/edited (changes: bogus_key1/bogus_key2)' event isn't currently supported by the GitHub webhook",
msg,
)
self.assertTrue(stack_info)