mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
Add WebhookTestCase abstract class for writing webhook tests.
This cuts a ton of code duplication and semi-duplication between the webhook tests, and thus should make it a lot easier to write new ones.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"type": "incident.triggered"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"type": "foo"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -359,7 +359,7 @@ class AuthedTestCase(TestCase):
|
||||
self.assert_json_success(result)
|
||||
|
||||
# Check the correct message was sent
|
||||
msg = Message.objects.filter().order_by('-id')[0]
|
||||
msg = self.get_last_message()
|
||||
self.assertEqual(msg.sender.email, email)
|
||||
self.assertEqual(get_display_recipient(msg.recipient), stream_name)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user