Exemplo n.º 1
0
def test_replace():
    s = Settings({'foo': 'bar'})

    new = Settings({'zing': 'zang'})

    s.replace(new)

    assert s.maps == new.maps
    with pytest.raises(htmap.exceptions.MissingSetting):
        s['foo']
    assert s['zing'] == 'zang'
Exemplo n.º 2
0
def test_replace():
    s = Settings({"foo": "bar"})

    new = Settings({"zing": "zang"})

    s.replace(new)

    assert s.maps == new.maps
    with pytest.raises(htmap.exceptions.MissingSetting):
        s["foo"]
    assert s["zing"] == "zang"