Skip to content

Commit

Permalink
tests: Remove update-subscription-data from curl test exclude_list.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerkid authored and timabbott committed Oct 30, 2019
1 parent eb567ab commit db29407
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 11 additions & 0 deletions zerver/openapi/curl_param_value_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("[email protected]", get_realm("zulip")), "Verona")
helpers.subscribe(get_user("[email protected]", 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"}
]
}
1 change: 0 additions & 1 deletion zerver/openapi/test_curl_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# 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',
Expand Down

0 comments on commit db29407

Please sign in to comment.