mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
pre-commit: run black with string normalization
This commit is contained in:
@@ -13,16 +13,16 @@ def test_ensure_config_yaml(tljh_dir):
|
||||
installer.ensure_config_yaml(pm)
|
||||
assert os.path.exists(installer.CONFIG_FILE)
|
||||
assert os.path.isdir(installer.CONFIG_DIR)
|
||||
assert os.path.isdir(os.path.join(installer.CONFIG_DIR, 'jupyterhub_config.d'))
|
||||
assert os.path.isdir(os.path.join(installer.CONFIG_DIR, "jupyterhub_config.d"))
|
||||
# verify that old config doesn't exist
|
||||
assert not os.path.exists(os.path.join(tljh_dir, 'config.yaml'))
|
||||
assert not os.path.exists(os.path.join(tljh_dir, "config.yaml"))
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"admins, expected_config",
|
||||
[
|
||||
([['a1'], ['a2'], ['a3']], ['a1', 'a2', 'a3']),
|
||||
([['a1:p1'], ['a2']], ['a1', 'a2']),
|
||||
([["a1"], ["a2"], ["a3"]], ["a1", "a2", "a3"]),
|
||||
([["a1:p1"], ["a2"]], ["a1", "a2"]),
|
||||
],
|
||||
)
|
||||
def test_ensure_admins(tljh_dir, admins, expected_config):
|
||||
@@ -35,4 +35,4 @@ def test_ensure_admins(tljh_dir, admins, expected_config):
|
||||
config = yaml.load(f)
|
||||
|
||||
# verify the list was flattened
|
||||
assert config['users']['admin'] == expected_config
|
||||
assert config["users"]["admin"] == expected_config
|
||||
|
||||
Reference in New Issue
Block a user