Add filter for disabled users to superuser user list API
Fixes https://jira.coreos.com/browse/QS-102
This commit is contained in:
parent
1d3a93efcb
commit
8e473b9779
6 changed files with 44 additions and 19 deletions
19
endpoints/api/test/test_superuser.py
Normal file
19
endpoints/api/test/test_superuser.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import pytest
|
||||
|
||||
from endpoints.api.superuser import SuperUserList
|
||||
from endpoints.api.test.shared import conduct_api_call
|
||||
from endpoints.test.shared import client_with_identity
|
||||
from test.fixtures import *
|
||||
|
||||
@pytest.mark.parametrize('disabled', [
|
||||
(True),
|
||||
(False),
|
||||
])
|
||||
def test_list_all_users(disabled, client):
|
||||
with client_with_identity('devtable', client) as cl:
|
||||
params = {'disabled': disabled}
|
||||
result = conduct_api_call(cl, SuperUserList, 'GET', params, None, 200).json
|
||||
assert len(result['users'])
|
||||
for user in result['users']:
|
||||
if not disabled:
|
||||
assert user['enabled']
|
Reference in a new issue