diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py index 64463f8057..b1eeb5fb6c 100644 --- a/zerver/lib/test_classes.py +++ b/zerver/lib/test_classes.py @@ -2234,7 +2234,7 @@ one or more new messages. self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=expected_topic_name, content=expected_message, ) @@ -2242,11 +2242,11 @@ one or more new messages. def assert_channel_message( self, message: Message, - stream_name: str, + channel_name: str, topic_name: str, content: str, ) -> None: - self.assert_message_stream_name(message, stream_name) + self.assert_message_stream_name(message, channel_name) self.assertEqual(message.topic_name(), topic_name) self.assertEqual(message.content, content) diff --git a/zerver/tests/test_webhooks_common.py b/zerver/tests/test_webhooks_common.py index 9f87bce244..656619430a 100644 --- a/zerver/tests/test_webhooks_common.py +++ b/zerver/tests/test_webhooks_common.py @@ -175,7 +175,7 @@ class WebhookURLConfigurationTestCase(WebhookTestCase): msg = self.get_last_message() self.assert_channel_message( message=msg, - stream_name="helloworld_renamed", + channel_name="helloworld_renamed", topic_name=expected_topic_name, content=expected_message, ) diff --git a/zerver/webhooks/bitbucket2/tests.py b/zerver/webhooks/bitbucket2/tests.py index 1890cde8f5..1c1ba22302 100644 --- a/zerver/webhooks/bitbucket2/tests.py +++ b/zerver/webhooks/bitbucket2/tests.py @@ -292,7 +292,7 @@ class Bitbucket2HookTests(WebhookTestCase): msg = self.get_second_to_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC, content=expected_message.format(name="a"), ) @@ -300,7 +300,7 @@ class Bitbucket2HookTests(WebhookTestCase): msg = self.get_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC, content=expected_message.format(name="b"), ) @@ -320,7 +320,7 @@ class Bitbucket2HookTests(WebhookTestCase): msg = self.get_second_to_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC_BRANCH_EVENTS, content="Tomasz [pushed](https://bitbucket.org/kolaszek/repository-name/branch/master) 1 commit to branch master.\n\n* first commit ([84b96adc644](https://bitbucket.org/kolaszek/repository-name/commits/84b96adc644a30fd6465b3d196369d880762afed))", ) @@ -328,7 +328,7 @@ class Bitbucket2HookTests(WebhookTestCase): msg = self.get_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC, content="Tomasz pushed tag [a](https://bitbucket.org/kolaszek/repository-name/commits/tag/a).", ) @@ -350,7 +350,7 @@ class Bitbucket2HookTests(WebhookTestCase): msg = self.get_second_to_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC_BRANCH_EVENTS, content="Tomasz [pushed](https://bitbucket.org/kolaszek/repository-name/branch/master) 1 commit to branch master.\n\n* first commit ([84b96adc644](https://bitbucket.org/kolaszek/repository-name/commits/84b96adc644a30fd6465b3d196369d880762afed))", ) @@ -358,7 +358,7 @@ class Bitbucket2HookTests(WebhookTestCase): msg = self.get_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC, content="Tomasz pushed tag [a](https://bitbucket.org/kolaszek/repository-name/commits/tag/a).", ) diff --git a/zerver/webhooks/bitbucket3/tests.py b/zerver/webhooks/bitbucket3/tests.py index bac5d5ae41..d4f8c3b22e 100644 --- a/zerver/webhooks/bitbucket3/tests.py +++ b/zerver/webhooks/bitbucket3/tests.py @@ -94,7 +94,7 @@ class Bitbucket3HookTests(WebhookTestCase): msg = self.get_second_to_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC_BRANCH_EVENTS.format(branch="branch1"), content=branch1_content, ) @@ -102,7 +102,7 @@ class Bitbucket3HookTests(WebhookTestCase): msg = self.get_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=TOPIC_BRANCH_EVENTS.format(branch="master"), content=master_content, ) diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.py index be2b535938..46c27ed5c4 100644 --- a/zerver/webhooks/github/tests.py +++ b/zerver/webhooks/github/tests.py @@ -560,7 +560,7 @@ A temporary team so that I can get some webhook fixtures! self.assert_channel_message( message=stream_message, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name="team My Team", content="Team has changes to `bogus_key1/bogus_key2` data.", ) diff --git a/zerver/webhooks/jira/tests.py b/zerver/webhooks/jira/tests.py index 2b570fe7ed..1c9538e5a7 100644 --- a/zerver/webhooks/jira/tests.py +++ b/zerver/webhooks/jira/tests.py @@ -28,7 +28,7 @@ Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/ """.strip() self.assert_channel_message( message=msg, - stream_name="jira_custom", + channel_name="jira_custom", topic_name="BUG-15: New bug with hook", content=expected_content, ) diff --git a/zerver/webhooks/slack_incoming/tests.py b/zerver/webhooks/slack_incoming/tests.py index b0a25af7ca..cbf96e5e98 100644 --- a/zerver/webhooks/slack_incoming/tests.py +++ b/zerver/webhooks/slack_incoming/tests.py @@ -39,7 +39,7 @@ Hello, world. ) self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name="(no topic)", content=output_value, ) diff --git a/zerver/webhooks/updown/tests.py b/zerver/webhooks/updown/tests.py index 7a9f0bca29..cb685ffecc 100644 --- a/zerver/webhooks/updown/tests.py +++ b/zerver/webhooks/updown/tests.py @@ -40,7 +40,7 @@ class UpdownHookTests(WebhookTestCase): msg = self.get_second_to_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=topic_name, content=down_content, ) @@ -48,7 +48,7 @@ class UpdownHookTests(WebhookTestCase): msg = self.get_last_message() self.assert_channel_message( message=msg, - stream_name=self.CHANNEL_NAME, + channel_name=self.CHANNEL_NAME, topic_name=topic_name, content=up_content, )