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

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

    assert s.to_dict() == {"outer": {"inner": "foo"}}
Пример #3
0
def test_to_dict_with_no_overlap():
    s = Settings({
        'outer': {
            'top': 'this',
        },
    }, {
        'outer': {
            'bottom': 'that',
        },
    })

    assert s.to_dict() == {'outer': {'top': 'this', 'bottom': 'that'}}
Пример #4
0
def test_to_dict_with_override():
    s = Settings({
        'outer': {
            'inner': 'override',
        },
    }, {
        'outer': {
            'inner': 'hidden',
        },
    })

    assert s.to_dict() == {'outer': {'inner': 'override'}}
Пример #5
0
def test_to_dict_with_no_overlap():
    s = Settings({
        "outer": {
            "top": "this",
        },
    }, {
        "outer": {
            "bottom": "that",
        },
    })

    assert s.to_dict() == {"outer": {"top": "this", "bottom": "that"}}
Пример #6
0
def test_to_dict_with_override():
    s = Settings({
        "outer": {
            "inner": "override",
        },
    }, {
        "outer": {
            "inner": "hidden",
        },
    })

    assert s.to_dict() == {"outer": {"inner": "override"}}