| Conditions | 4 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from fastest.fuzzers.primitive_fuzzer.fuzz import random_integers, random_ascii_chars, random_float |
||
| 15 | def schema_to_object_builder(schema, name='__root__'): |
||
| 16 | root_object = build_empty_of_type(schema['type'])() |
||
| 17 | |||
| 18 | if schema['type'] == 'list': |
||
| 19 | root_object.append(schema_to_object_builder(schema['inner'])) |
||
| 20 | |||
| 21 | elif schema['type'] == 'dict': |
||
| 22 | for prop in schema['inner']: |
||
| 23 | root_object[prop['name']] = schema_to_object_builder(prop) |
||
| 24 | |||
| 25 | return root_object |
||
| 26 |