api docs: Add page for common error payloads.

We now have a separate page for common error payloads, for example,
the payload for when the client's API key is invalid. All error
payloads that are presented on this page will be tested similarly
to our other non-error sample fixtures.
This commit is contained in:
Eeshan Garg
2018-02-06 16:34:07 -03:30
committed by Tim Abbott
parent 037c891fcf
commit 929724e5e7
21 changed files with 32 additions and 41 deletions

View File

@@ -279,6 +279,13 @@ def update_message(client, message_id):
assert result['result'] == 'success'
assert result['raw_content'] == request['content']
def test_invalid_api_key(client_with_invalid_key):
# type: (Client) -> None
result = client_with_invalid_key.list_subscriptions()
fixture = FIXTURES['invalid-api-key']
test_against_fixture(result, fixture)
TEST_FUNCTIONS = {
'render-message': render_message,
'stream-message': stream_message,
@@ -343,5 +350,3 @@ def test_the_api(client):
test_users(client)
test_streams(client)
test_messages(client)
# print(dir(client))