diff --git a/zerver/openapi/curl_param_value_generators.py b/zerver/openapi/curl_param_value_generators.py index 8cd70dc9f2..0e224f91d1 100644 --- a/zerver/openapi/curl_param_value_generators.py +++ b/zerver/openapi/curl_param_value_generators.py @@ -85,3 +85,14 @@ def get_denmark_stream_id_and_topic() -> Dict[str, Any]: "stream_id": helpers.get_stream_id(stream_name), "topic_name": topic_name, } + +@openapi_param_value_generator(["/users/me/subscriptions/properties:post"]) +def update_subscription_data() -> Dict[str, List[Dict[str, Any]]]: + helpers.subscribe(get_user("default-bot@zulip.com", get_realm("zulip")), "Verona") + helpers.subscribe(get_user("default-bot@zulip.com", get_realm("zulip")), "social") + return { + "subscription_data": [ + {"stream_id": helpers.get_stream_id("Verona"), "property": "pin_to_top", "value": True}, + {"stream_id": helpers.get_stream_id("social"), "property": "color", "value": "#f00f00"} + ] + } diff --git a/zerver/openapi/test_curl_examples.py b/zerver/openapi/test_curl_examples.py index 912a26eb57..a7687cbba4 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', - 'update-subscription-properties.md', 'remove-subscriptions.md', 'get-stream-topics.md', 'delete-stream.md',