mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
api docs: Test sample fixture for user not authorized error.
This commit adds tests for the fixture for when a user is not authorized (perhaps because the query requires the use of admin privileges) for a particular query.
This commit is contained in:
@@ -152,6 +152,13 @@ def get_streams(client):
|
||||
check_if_exists=['streams'])
|
||||
assert len(result['streams']) == 4
|
||||
|
||||
def test_user_not_authorized_error(nonadmin_client):
|
||||
# type: (Client) -> None
|
||||
result = nonadmin_client.get_streams(include_all_active=True)
|
||||
|
||||
fixture = FIXTURES['user-not-authorized-error']
|
||||
test_against_fixture(result, fixture)
|
||||
|
||||
def get_subscribers(client):
|
||||
# type: (Client) -> None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user