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:
Steve Howell
2018-11-09 19:33:58 +00:00
committed by Tim Abbott
parent 3133998af9
commit ced4d81856
54 changed files with 743 additions and 743 deletions

View File

@@ -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: