OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import json_schema | 6 import json_schema |
7 import json_schema_test | |
8 import unittest | 7 import unittest |
9 | 8 |
10 class JsonSchemaUnittest(unittest.TestCase): | 9 class JsonSchemaUnittest(unittest.TestCase): |
11 def testNocompile(self): | 10 def testNocompile(self): |
12 compiled = [ | 11 compiled = [ |
13 { | 12 { |
14 "namespace": "compile", | 13 "namespace": "compile", |
15 "description": "The compile API.", | 14 "description": "The compile API.", |
16 "functions": [], | 15 "functions": [], |
17 "types": {} | 16 "types": {} |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 71 } |
73 } | 72 } |
74 } | 73 } |
75 } | 74 } |
76 } | 75 } |
77 ] | 76 ] |
78 | 77 |
79 schema = json_schema.CachedLoad('test/json_schema_test.json') | 78 schema = json_schema.CachedLoad('test/json_schema_test.json') |
80 self.assertEquals(compiled, json_schema.DeleteNodes(schema, 'nocompile')) | 79 self.assertEquals(compiled, json_schema.DeleteNodes(schema, 'nocompile')) |
81 | 80 |
| 81 |
82 if __name__ == '__main__': | 82 if __name__ == '__main__': |
83 unittest.main() | 83 unittest.main() |
OLD | NEW |