mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
allow services to call /api/user to identify themselves
This commit is contained in:
@@ -277,6 +277,17 @@ async def test_get_self(app):
|
||||
assert r.status_code == 403
|
||||
|
||||
|
||||
async def test_get_self_service(app, mockservice):
|
||||
r = await api_request(
|
||||
app, "user", headers={"Authorization": f"token {mockservice.api_token}"}
|
||||
)
|
||||
r.raise_for_status()
|
||||
service_info = r.json()
|
||||
|
||||
assert service_info['kind'] == 'service'
|
||||
assert service_info['name'] == mockservice.name
|
||||
|
||||
|
||||
@mark.user
|
||||
async def test_add_user(app):
|
||||
db = app.db
|
||||
|
Reference in New Issue
Block a user