Merge commit '0a93c5da6f8db71ded773af1d5609c5f2e6ba241'
This commit is contained in:
@@ -52,9 +52,8 @@ they should be valid or invalid.
|
||||
Coverage
|
||||
--------
|
||||
|
||||
Currently, draft 3 should have essentially full coverage for the core schema.
|
||||
|
||||
The beginnings of draft 4 are underway.
|
||||
Draft 3 and 4 should have full coverage. If you see anything missing or think
|
||||
there is a useful test missing, please send a pull request or open an issue.
|
||||
|
||||
Who Uses the Test Suite
|
||||
-----------------------
|
||||
@@ -68,6 +67,7 @@ This suite is being used by:
|
||||
* [jsonschema (javascript)](https://github.com/tdegrunt/jsonschema)
|
||||
* [JaySchema (javascript)](https://github.com/natesilva/jayschema)
|
||||
* [jesse (Erlang)](https://github.com/klarna/jesse)
|
||||
* [json-schema (PHP)](https://github.com/justinrainbow/json-schema)
|
||||
|
||||
If you use it as well, please fork and send a pull request adding yourself to
|
||||
the list :).
|
||||
|
@@ -32,6 +32,10 @@ try:
|
||||
import jsonschema
|
||||
except ImportError:
|
||||
jsonschema = None
|
||||
else:
|
||||
validators = getattr(
|
||||
jsonschema.validators, "validators", jsonschema.validators
|
||||
)
|
||||
|
||||
|
||||
ROOT_DIR = os.path.join(
|
||||
@@ -138,8 +142,8 @@ class SanityTests(unittest.TestCase):
|
||||
@unittest.skipIf(jsonschema is None, "Validation library not present!")
|
||||
def test_all_schemas_are_valid(self):
|
||||
for schema in os.listdir(SUITE_ROOT_DIR):
|
||||
schema_validator = jsonschema.validators.get(schema)
|
||||
if schema_validator:
|
||||
schema_validator = validators.get(schema)
|
||||
if schema_validator is not None:
|
||||
test_files = collect(os.path.join(SUITE_ROOT_DIR, schema))
|
||||
for case in cases(test_files):
|
||||
try:
|
||||
|
@@ -28,6 +28,11 @@
|
||||
"description": "an invalid date-time string",
|
||||
"data": "06/19/1963 08:30:06 PST",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"description": "only RFC3339 not all of ISO 8601 are valid",
|
||||
"data": "2013-350T01:01:01",
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -12,6 +12,11 @@
|
||||
"description": "an invalid date-time string",
|
||||
"data": "06/19/1963 08:30:06 PST",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"description": "only RFC3339 not all of ISO 8601 are valid",
|
||||
"data": "2013-350T01:01:01",
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user