mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
tests: Allow testing our REST API against the OpenAPI docs.
This commit is contained in:
committed by
Tim Abbott
parent
bfcd7b0151
commit
9f98002b76
@@ -6,7 +6,7 @@ import json
|
||||
import os
|
||||
|
||||
from zerver.lib import mdiff
|
||||
from zerver.lib.openapi import get_openapi_fixture
|
||||
from zerver.lib.openapi import validate_against_openapi_schema
|
||||
|
||||
if False:
|
||||
from zulip import Client
|
||||
@@ -385,9 +385,7 @@ def update_message(client, message_id):
|
||||
result = client.update_message(request)
|
||||
# {code_example|end}
|
||||
|
||||
fixture = get_openapi_fixture('/messages/{message_id}', 'patch', '200')
|
||||
|
||||
test_against_fixture(result, fixture)
|
||||
validate_against_openapi_schema(result, '/messages/{message_id}', 'patch')
|
||||
|
||||
# test it was actually updated
|
||||
url = 'messages/' + str(message_id)
|
||||
|
||||
Reference in New Issue
Block a user