mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +00:00
Merge pull request #1768 from sangramga/master
Added Post groups API in group list handlers
This commit is contained in:
@@ -988,6 +988,26 @@ def test_groups_list(app):
|
||||
}]
|
||||
|
||||
|
||||
@mark.group
|
||||
@mark.gen_test
|
||||
def test_add_multi_group(app):
|
||||
db = app.db
|
||||
names = ['group1', 'group2']
|
||||
r = yield api_request(app, 'groups', method='post',
|
||||
data=json.dumps({'groups': names}),
|
||||
)
|
||||
assert r.status_code == 201
|
||||
reply = r.json()
|
||||
r_names = [group['name'] for group in reply]
|
||||
assert names == r_names
|
||||
|
||||
# try to create the same groups again
|
||||
r = yield api_request(app, 'users', method='post',
|
||||
data=json.dumps({'groups': names}),
|
||||
)
|
||||
assert r.status_code == 400
|
||||
|
||||
|
||||
@mark.group
|
||||
@mark.gen_test
|
||||
def test_group_get(app):
|
||||
|
Reference in New Issue
Block a user