Mercurial > hgrepos > Python > libs > data-schema
comparison tests/test_schema.py @ 43:4ca530618303
Enhance for formery added check when handling conditionals after resolving schema references
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 20 Jul 2023 09:37:22 +0200 |
| parents | 0e7acd426e3a |
| children | ea8c2d01a9d9 |
comparison
equal
deleted
inserted
replaced
| 42:0e7acd426e3a | 43:4ca530618303 |
|---|---|
| 1140 "then": {"$type": "string"}}, | 1140 "then": {"$type": "string"}}, |
| 1141 {"when": True, | 1141 {"when": True, |
| 1142 "then": {"$type": None}} | 1142 "then": {"$type": None}} |
| 1143 ]}}}) | 1143 ]}}}) |
| 1144 r = data_schema.process_schema_conditionals(schema, self._ctx) | 1144 r = data_schema.process_schema_conditionals(schema, self._ctx) |
| 1145 self.assertIs(r, schema) | |
| 1145 r = data_schema.process_schema_references(r, self._ctx, check_single_ref_key=False) | 1146 r = data_schema.process_schema_references(r, self._ctx, check_single_ref_key=False) |
| 1146 self.assertIsNot(r, schema) | 1147 self.assertIsNot(r, schema) |
| 1147 self.assertEqual("string", r["$type"]) | 1148 self.assertEqual("string", r["$type"]) |
| 1148 | 1149 |
| 1149 def test_anyOf_false(self): | 1150 def test_anyOf_false(self): |
