From 6da32a5af678c573a43b913cf9e57e932e75ea6f Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Fri, 3 Jun 2016 09:13:37 -0400 Subject: [PATCH] Fix failing tests from previous clive fix I changed clive so that it showed something like TOP->foo->bar instead of TOP:foo:bar because : was being used as a delimiter between fields. I screwed up and pushed the fix without testing it. This fixes the tests accordingly. --- src/tests/test_schemalib.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/test_schemalib.py b/src/tests/test_schemalib.py index cb4704a3..15d4ab0c 100755 --- a/src/tests/test_schemalib.py +++ b/src/tests/test_schemalib.py @@ -238,7 +238,7 @@ def test_subtype(self): def test_bad_subtype(self): assert ( DictOfT({'foo': IntT()}).validate({'foo': 'bar'}, '') == - [Result(ERROR, 0, 0, ':foo', 'value is not a valid int: %r' % 'bar')] + [Result(ERROR, 0, 0, '->foo', 'value is not a valid int: %r' % 'bar')] ) def test_unknown_keys(self): @@ -250,14 +250,14 @@ def test_unknown_keys(self): def test_depth(self): assert ( DictOfT({'foo': IntT()}).validate({'foo': 'bar'}, 'TOP') == - [Result(ERROR, 0, 0, 'TOP:foo', 'value is not a valid int: %r' % 'bar')] + [Result(ERROR, 0, 0, 'TOP->foo', 'value is not a valid int: %r' % 'bar')] ) def test_recursion(self): assert DictOfT({'foo': DictOfT({'bar': IntT()})}).validate({'foo': {'bar': 5}}, 'TOP') == [] assert ( DictOfT({'foo': DictOfT({'bar': IntT()})}).validate({'foo': {'bar': 'baz'}}, 'TOP') == - [Result(ERROR, 0, 0, 'TOP:foo:bar', 'value is not a valid int: %r' % 'baz')] + [Result(ERROR, 0, 0, 'TOP->foo->bar', 'value is not a valid int: %r' % 'baz')] ) req = DictOfT({ @@ -278,7 +278,7 @@ def test_recursion(self): assert ( sort_results(req.validate(data, 'TOP')) == sort_results([ - Result(ERROR, 0, 0, 'TOP:bar', 'value is not a valid int: %r' % 'foo1'), - Result(ERROR, 0, 0, 'TOP:baz:key', 'value is not a valid int: %r' % 'foo2'), + Result(ERROR, 0, 0, 'TOP->bar', 'value is not a valid int: %r' % 'foo1'), + Result(ERROR, 0, 0, 'TOP->baz->key', 'value is not a valid int: %r' % 'foo2'), ]) )