mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #1026 from jrdnbradford/schema-unittests
`tljh-config` JSON schema unit tests
This commit is contained in:
13
tests/test_config_schema.py
Normal file
13
tests/test_config_schema.py
Normal 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)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user