diff --git a/zerver/openapi/curl_param_value_generators.py b/zerver/openapi/curl_param_value_generators.py index 0e5d356c01..8cd70dc9f2 100644 --- a/zerver/openapi/curl_param_value_generators.py +++ b/zerver/openapi/curl_param_value_generators.py @@ -66,3 +66,22 @@ def update_flags_message_ids() -> Dict[str, List[int]]: return { "messages": messages, } + +@openapi_param_value_generator(["/mark_stream_as_read:post"]) +def get_venice_stream_id() -> Dict[str, int]: + return { + "stream_id": helpers.get_stream_id("Venice"), + } + +@openapi_param_value_generator(["/mark_topic_as_read:post"]) +def get_denmark_stream_id_and_topic() -> Dict[str, Any]: + stream_name = "Denmark" + topic_name = "Tivoli Gardens" + + helpers.subscribe(get_user("default-bot@zulip.com", get_realm("zulip")), stream_name) + helpers.send_stream_message(helpers.example_email("hamlet"), stream_name, topic_name=topic_name) + + return { + "stream_id": helpers.get_stream_id(stream_name), + "topic_name": topic_name, + } diff --git a/zerver/openapi/test_curl_examples.py b/zerver/openapi/test_curl_examples.py index 1efa907faa..912a26eb57 100644 --- a/zerver/openapi/test_curl_examples.py +++ b/zerver/openapi/test_curl_examples.py @@ -15,7 +15,6 @@ exclude_list = [ # We currently get the example values from openapi specs and they don't refelect the # state of the DB. This results in the curl request to fail. 'delete-message.md', - 'mark-as-read-bulk.md', 'update-subscription-properties.md', 'remove-subscriptions.md', 'get-stream-topics.md',