Example #1
0
def test_to_dict_with_single_map():
    s = Settings({
        'outer': {
            'inner': 'foo',
        },
    })

    assert s.to_dict() == {'outer': {'inner': 'foo'}}
Example #2
0
def test_to_dict_with_single_map():
    s = Settings({
        "outer": {
            "inner": "foo",
        },
    })

    assert s.to_dict() == {"outer": {"inner": "foo"}}
Example #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'}}
Example #4
0
def test_to_dict_with_override():
    s = Settings({
        'outer': {
            'inner': 'override',
        },
    }, {
        'outer': {
            'inner': 'hidden',
        },
    })

    assert s.to_dict() == {'outer': {'inner': 'override'}}
Example #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"}}
Example #6
0
def test_to_dict_with_override():
    s = Settings({
        "outer": {
            "inner": "override",
        },
    }, {
        "outer": {
            "inner": "hidden",
        },
    })

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