Skip to content

Commit 3eeb028

Browse files
authored
Merge pull request #1026 from jrdnbradford/schema-unittests
`tljh-config` JSON schema unit tests
2 parents 0384a46 + 142d226 commit 3eeb028

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tests/test_config_schema.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Unit test functions to test JSON Schema validation
3+
"""
4+
5+
import jsonschema
6+
7+
from tljh.config_schema import config_schema
8+
9+
10+
def test_valid_config_json_schema():
11+
"""Validate that the JSON schema fits its $schema specification"""
12+
validator_class = jsonschema.validators.validator_for(config_schema)
13+
validator_class.check_schema(config_schema)

tljh/configurer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
be called many times per lifetime of a jupyterhub.
66
77
Traitlets that modify the startup of JupyterHub should not be here.
8-
FIXME: A strong feeling that JSON Schema should be involved somehow.
98
"""
109

1110
import os

0 commit comments

Comments
 (0)