示例#1
0
def test_fallback():
    d = DogmaticDict(fallback={'a': 23})
    assert 'a' in d
    assert d['a'] == 23
    assert d.get('a') == 23

    d = DogmaticDict()
    d.fallback = {'a': 23}
    assert 'a' in d
    assert d['a'] == 23
    assert d.get('a') == 23
示例#2
0
def test_fallback():
    d = DogmaticDict(fallback={'a': 23})
    assert 'a' in d
    assert d['a'] == 23
    assert d.get('a') == 23

    d = DogmaticDict()
    d.fallback = {'a': 23}
    assert 'a' in d
    assert d['a'] == 23
    assert d.get('a') == 23
示例#3
0
def test_fallback():
    d = DogmaticDict(fallback={"a": 23})
    assert "a" in d
    assert d["a"] == 23
    assert d.get("a") == 23

    d = DogmaticDict()
    d.fallback = {"a": 23}
    assert "a" in d
    assert d["a"] == 23
    assert d.get("a") == 23