mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Sweep tests for expected_subject -> expected_topic.
This is all in the webhooks tests, including some docs for how to write those tests.
This commit is contained in:
@@ -11,17 +11,17 @@ class SemaphoreHookTests(WebhookTestCase):
|
||||
# details about the build, deploy, server, author, and commit
|
||||
|
||||
def test_semaphore_build(self) -> None:
|
||||
expected_subject = u"knighthood/master" # repo/branch
|
||||
expected_topic = u"knighthood/master" # repo/branch
|
||||
expected_message = u"""[build 314](https://semaphoreci.com/donquixote/knighthood/branches/master/builds/314): passed
|
||||
!avatar(don@lamancha.com) [`a490b8d`](https://github.com/donquixote/knighthood/commit/a490b8d508ebbdab1d77a5c2aefa35ceb2d62daf): Create user account for Rocinante :horse:."""
|
||||
self.send_and_test_stream_message('build', expected_subject, expected_message,
|
||||
self.send_and_test_stream_message('build', expected_topic, expected_message,
|
||||
content_type="application/x-www-form-urlencoded")
|
||||
|
||||
def test_semaphore_deploy(self) -> None:
|
||||
expected_subject = u"knighthood/master"
|
||||
expected_topic = u"knighthood/master"
|
||||
expected_message = u"""[deploy 17](https://semaphoreci.com/donquixote/knighthood/servers/lamancha-271/deploys/17) of [build 314](https://semaphoreci.com/donquixote/knighthood/branches/master/builds/314) on server lamancha-271: passed
|
||||
!avatar(don@lamancha.com) [`a490b8d`](https://github.com/donquixote/knighthood/commit/a490b8d508ebbdab1d77a5c2aefa35ceb2d62daf): Create user account for Rocinante :horse:."""
|
||||
self.send_and_test_stream_message('deploy', expected_subject, expected_message,
|
||||
self.send_and_test_stream_message('deploy', expected_topic, expected_message,
|
||||
content_type="application/x-www-form-urlencoded")
|
||||
|
||||
def get_body(self, fixture_name: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user