Merge ~jslarraz/review-tools:unify-schema-validation into review-tools:master

Proposed by Jorge Sancho Larraz
Status: Merged
Merged at revision: c609f1ea12513ffde000acdadb9f986970c4fb8e
Proposed branch: ~jslarraz/review-tools:unify-schema-validation
Merge into: review-tools:master
Diff against target: 18 lines (+2/-2)
1 file modified
reviewtools/tests/schemas/test_schema_base.py (+2/-2)
Reviewer Review Type Date Requested Status
MyApps reviewers Pending
Review via email: mp+466378@code.launchpad.net

Commit message

rt/tests/s/test_schema_base.py: fix error handling

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/reviewtools/tests/schemas/test_schema_base.py b/reviewtools/tests/schemas/test_schema_base.py
index d6c4536..cf29758 100644
--- a/reviewtools/tests/schemas/test_schema_base.py
+++ b/reviewtools/tests/schemas/test_schema_base.py
@@ -1,4 +1,3 @@
1import json
2import copy1import copy
3import unittest2import unittest
4from reviewtools.schemas.schema_validator import validate3from reviewtools.schemas.schema_validator import validate
@@ -27,6 +26,7 @@ class TestSchemaBase(unittest.TestCase):
2726
28 # Compare the errors against the expected ones27 # Compare the errors against the expected ones
29 if expected_error is None:28 if expected_error is None:
30 self.assertIsNone(e.message)29 self.assertIsNone(e)
31 else:30 else:
31 self.assertIsNotNone(e)
32 self.assertIn(expected_error, e.message)32 self.assertIn(expected_error, e.message)

Subscribers

People subscribed via source and target branches