mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
string_validation: Standardize missing topic with missing stream name.
Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ def check_stream_name(stream_name: str) -> None:
|
|||||||
|
|
||||||
def check_stream_topic(topic: str) -> None:
|
def check_stream_topic(topic: str) -> None:
|
||||||
if topic.strip() == "":
|
if topic.strip() == "":
|
||||||
raise JsonableError(_("Topic can't be empty"))
|
raise JsonableError(_("Topic can't be empty!"))
|
||||||
|
|
||||||
for character in topic:
|
for character in topic:
|
||||||
unicodeCategory = unicodedata.category(character)
|
unicodeCategory = unicodedata.category(character)
|
||||||
|
|||||||
@@ -723,7 +723,7 @@ class MessagePOSTTest(ZulipTestCase):
|
|||||||
"topic": "",
|
"topic": "",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
self.assert_json_error(result, "Topic can't be empty")
|
self.assert_json_error(result, "Topic can't be empty!")
|
||||||
|
|
||||||
def test_missing_topic(self) -> None:
|
def test_missing_topic(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user