mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
test refactor: refactoring of .github/integration-test.py
This commit is contained in:
@@ -4,13 +4,14 @@ import pytest
|
||||
from hubtraf.auth.dummy import login_dummy
|
||||
from hubtraf.user import User
|
||||
|
||||
hub_url = "http://localhost"
|
||||
|
||||
|
||||
async def test_admin_login():
|
||||
"""
|
||||
Test if the admin that was added during install can login with
|
||||
the password provided.
|
||||
"""
|
||||
hub_url = "http://localhost"
|
||||
username = "admin"
|
||||
password = "admin"
|
||||
|
||||
@@ -32,8 +33,6 @@ async def test_unsuccessful_login(username, password):
|
||||
"""
|
||||
Ensure nobody but the admin that was added during install can login
|
||||
"""
|
||||
hub_url = "http://localhost"
|
||||
|
||||
async with User(username, hub_url, partial(login_dummy, password="")) as u:
|
||||
user_logged_in = await u.login()
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@ This test file tests bootstrap.py ability to
|
||||
- error verbosely for old ubuntu
|
||||
- error verbosely for no systemd
|
||||
- start and provide a progress page web server
|
||||
|
||||
FIXME: The last test stands out and could be part of the other tests, and the
|
||||
first two could be more like unit tests. Ideally, this file is
|
||||
significantly reduced.
|
||||
"""
|
||||
import concurrent.futures
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user