Test round-trip of nested object.
()
| 18 | |
| 19 | |
| 20 | def test_roundtrip_nested_object(): |
| 21 | """Test round-trip of nested object.""" |
| 22 | original = { |
| 23 | 'user': { |
| 24 | 'name': 'Alice', |
| 25 | 'profile': { |
| 26 | 'age': 30, |
| 27 | 'city': 'NYC' |
| 28 | } |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | toon = encode(original) |
| 33 | result = decode(toon) |
| 34 | |
| 35 | assert result == original |
| 36 | |
| 37 | |
| 38 | def test_roundtrip_primitive_array(): |