Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_markdown: Use make_stream function for creating streams.
Sahil Batrabcef35490de2
diff --git a/zerver/tests/test_markdown.py b/zerver/tests/test_markdown.pyindex aa90b09d055..23e2c39562b 100644--- a/zerver/tests/test_markdown.py+++ b/zerver/tests/test_markdown.py@@ -54,7 +54,6 @@ from zerver.models import (Message,RealmEmoji,RealmFilter,- Stream,UserGroup,UserMessage,UserProfile,@@ -2498,7 +2497,7 @@ class MarkdownTest(ZulipTestCase):def test_stream_case_sensitivity(self) -> None:realm = get_realm("zulip")- case_sens = Stream.objects.create(name="CaseSens", realm=realm)+ case_sens = self.make_stream(stream_name="CaseSens", realm=realm)sender_user_profile = self.example_user("othello")msg = Message(sender=sender_user_profile, sending_client=get_client("test"))content = "#**CaseSens**"@@ -2514,7 +2513,7 @@ class MarkdownTest(ZulipTestCase):currently. If we change that in the future, we'll need to change thistest."""realm = get_realm("zulip")- Stream.objects.create(name="CaseSens", realm=realm)+ self.make_stream(stream_name="CaseSens", realm=realm)sender_user_profile = self.example_user("othello")msg = Message(sender=sender_user_profile, sending_client=get_client("test"))content = "#**casesens**"@@ -2589,7 +2588,7 @@ class MarkdownTest(ZulipTestCase):def test_stream_unicode(self) -> None:realm = get_realm("zulip")- uni = Stream.objects.create(name="привет", realm=realm)+ uni = self.make_stream(stream_name="привет", realm=realm)sender_user_profile = self.example_user("othello")msg = Message(sender=sender_user_profile, sending_client=get_client("test"))content = "#**привет**"@@ -2617,7 +2616,7 @@ class MarkdownTest(ZulipTestCase):"<RealmFilter(zulip): #(?P<id>[0-9]{2,8}) https://trac.example.com/ticket/%(id)s>",)# Create a stream that potentially interferes with the pattern.- stream = Stream.objects.create(name="Stream #1234", realm=realm)+ stream = self.make_stream(stream_name="Stream #1234", realm=realm)msg = Message(sender=sender_user_profile, sending_client=get_client("test"))content = "#**Stream #1234**"href = f"/#narrow/stream/{stream.id}-Stream-.231234"