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
1diff --git a/reviewtools/tests/schemas/test_schema_base.py b/reviewtools/tests/schemas/test_schema_base.py
2index d6c4536..cf29758 100644
3--- a/reviewtools/tests/schemas/test_schema_base.py
4+++ b/reviewtools/tests/schemas/test_schema_base.py
5@@ -1,4 +1,3 @@
6-import json
7 import copy
8 import unittest
9 from reviewtools.schemas.schema_validator import validate
10@@ -27,6 +26,7 @@ class TestSchemaBase(unittest.TestCase):
11
12 # Compare the errors against the expected ones
13 if expected_error is None:
14- self.assertIsNone(e.message)
15+ self.assertIsNone(e)
16 else:
17+ self.assertIsNotNone(e)
18 self.assertIn(expected_error, e.message)

Subscribers

People subscribed via source and target branches