def test_cycle_stringify():
    a = JsonObj(**{"a": 'c', "herm": 123})
    b = JsonObj(**{"c": 'c', 'd': a})
    a.circle = b
    with pytest.raises((TypeError, ValueError)):
        json_str = a.to_json()
def test_cycle_eject():
    a = JsonObj(**{"a": 'c', "herm": 123})
    b = JsonObj(**{"c": 'c', 'd': a})
    a.circle = b
    astring = str(a)
    assert isinstance(astring, str)