def test_expando_to_dict_with_update():
    d1 = {"a": 123, "b": "abc"}
    x = Expando(d1)
    d = {"b": {"c": 456, "d": {"e": "abc"}}, "f": "lmn"}
    x.update(d)
    expected = {}
    expected.update(d1)
    expected.update(d)
    assert expected == x.to_dict()
    d2 = {"a": 789, "f": "opq"}
    y = Expando(d2)
    x.update(y)
    expected.update(d2)
    assert expected == x.to_dict()
dataset/ETHPy150Open hyde/hyde/tests/test_model.py/test_expando_to_dict_with_update/original