summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--json/tests/draft3/enum.json2
-rw-r--r--json/tests/draft3/uniqueItems.json19
-rw-r--r--tests.py3
3 files changed, 10 insertions, 14 deletions
diff --git a/json/tests/draft3/enum.json b/json/tests/draft3/enum.json
index 3bf90f2..a539edb 100644
--- a/json/tests/draft3/enum.json
+++ b/json/tests/draft3/enum.json
@@ -17,7 +17,7 @@
},
{
"description": "heterogeneous enum validation",
- "schema": {"enum": [1, "foo", [], true, {"foo": 12}]},
+ "schema": {"enum": [6, "foo", [], true, {"foo": 12}]},
"tests": [
{
"description": "one of the enum is valid",
diff --git a/json/tests/draft3/uniqueItems.json b/json/tests/draft3/uniqueItems.json
index 50b7b4e..15a493a 100644
--- a/json/tests/draft3/uniqueItems.json
+++ b/json/tests/draft3/uniqueItems.json
@@ -52,23 +52,18 @@
]
},
{
- "description": "heterogeneous enum validation",
- "schema": {"enum": [1, "foo", [], true, {"foo": 12}]},
+ "description": "uniqueItems booleans and integers",
+ "schema": {"uniqueItems": true},
"tests": [
{
- "description": "one of the enum is valid",
- "data": [],
+ "description": "1 and true are unique",
+ "data": [1, true],
"valid": true
},
{
- "description": "something else is invalid",
- "data": null,
- "valid": false
- },
- {
- "description": "objects are deep compared",
- "data": {"foo": false},
- "valid": false
+ "description": "0 and false are unique",
+ "data": [0, false],
+ "valid": true
}
]
}
diff --git a/tests.py b/tests.py
index 8bb5567..5be6564 100644
--- a/tests.py
+++ b/tests.py
@@ -54,8 +54,9 @@ def load_json_cases(test_dir):
)
# XXX: Disable some tests due to issue #43
- if case.get("description") == "heterogeneous enum validation":
+ if case["description"].startswith("uniqueItems bool"):
a_test = expectedFailure(a_test)
+
test_name = "test_%s_%s" % (
filename[:-5], test["description"],
)