CDK: make TypeTransformer more robust to incorrect incoming records (#16544)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
This commit is contained in:
@@ -149,6 +149,18 @@ VERY_NESTED_SCHEMA = {
|
||||
{"cpc": 6.6666},
|
||||
None,
|
||||
),
|
||||
(
|
||||
{"type": "object", "properties": {"value": {"type": "array", "items": {"type": "string"}}}},
|
||||
{"value": {"key": "value"}},
|
||||
{"value": {"key": "value"}},
|
||||
"{'key': 'value'} is not of type 'array'",
|
||||
),
|
||||
(
|
||||
{"type": "object", "properties": {"value1": {"type": "object", "properties": {"value2": {"type": "string"}}}}},
|
||||
{"value1": "value2"},
|
||||
{"value1": "value2"},
|
||||
"'value2' is not of type 'object'",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_transform(schema, actual, expected, expected_warns, caplog):
|
||||
|
||||
Reference in New Issue
Block a user