Пример #1
0
def test_get_drills_through_dots():
    s = Settings({
        'outer': {
            'inner': 'foo',
        },
    })

    assert s.get('outer.inner') == 'foo'
Пример #2
0
def test_get_drills_through_dots():
    s = Settings({
        "outer": {
            "inner": "foo",
        },
    })

    assert s.get("outer.inner") == "foo"
Пример #3
0
def test_get_with_missing_key_returns_default():
    s = Settings()

    assert s.get('foo', default='bar') == 'bar'
Пример #4
0
def test_get_with_missing_key_returns_default():
    s = Settings()

    assert s.get("foo", default="bar") == "bar"