Merge pull request #1026 from jrdnbradford/schema-unittests

`tljh-config` JSON schema unit tests
This commit is contained in:
Sarah Gibson
2025-04-17 13:39:57 +01:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
"""
Unit test functions to test JSON Schema validation
"""
import jsonschema
from tljh.config_schema import config_schema
def test_valid_config_json_schema():
"""Validate that the JSON schema fits its $schema specification"""
validator_class = jsonschema.validators.validator_for(config_schema)
validator_class.check_schema(config_schema)

View File

@@ -5,7 +5,6 @@ Config should never append or mutate, only set. Functions here could
be called many times per lifetime of a jupyterhub.
Traitlets that modify the startup of JupyterHub should not be here.
FIXME: A strong feeling that JSON Schema should be involved somehow.
"""
import os