def test_complex_json(complex_child):
    """Test converting to json.

    Args:
        complex_child: A child class.
    """
    assert (
        complex_child.json().replace(" ", "")
        == '{"num":3.14,"key":"pi","name":"JohnDoe","age":30,"active":true}'
    )
Test converting to json.

    Args:
        complex_child: A child class.
    
tests/units/test_base.py