mirror of https://github.com/zulip/zulip.git
openapi: Update the test and python code example for get-all-users.
This is following the change to the /users endpoint where we allow an optional parameter "include_custom_profile_fields" which would allow the client to request for users' custom profile fields along with their other standard data.
This commit is contained in:
parent
c1370547d5
commit
ac9008f564
|
@ -204,6 +204,18 @@ def get_members(client):
|
|||
validate_against_openapi_schema(result, '/users', 'get', '200')
|
||||
assert result['members'][0]['avatar_url'] is None
|
||||
|
||||
# {code_example|start}
|
||||
# You may pass the `include_custom_profile_fields` query parameter as follows:
|
||||
result = client.get_members({'include_custom_profile_fields': True})
|
||||
# {code_example|end}
|
||||
|
||||
validate_against_openapi_schema(result, '/users', 'get', '200')
|
||||
for member in result['members']:
|
||||
if member["is_bot"]:
|
||||
assert member.get('profile_data', None) is None
|
||||
else:
|
||||
assert member.get('profile_data', None) is not None
|
||||
|
||||
@openapi_test_function("/realm/filters:get")
|
||||
def get_realm_filters(client):
|
||||
# type: (Client) -> None
|
||||
|
|
Loading…
Reference in New Issue