Test converting to json. Args: complex_child: A child class.
(complex_child)
| 92 | |
| 93 | |
| 94 | def test_complex_json(complex_child): |
| 95 | """Test converting to json. |
| 96 | |
| 97 | Args: |
| 98 | complex_child: A child class. |
| 99 | """ |
| 100 | assert ( |
| 101 | complex_child.json().replace(" ", "") |
| 102 | == '{"num":3.14,"key":"pi","name":"JohnDoe","age":30,"active":true}' |
| 103 | ) |