Example #1
0
def test_Section_update3():
    upd1 = {'a': 1}
    upd2 = {'b': 2}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1, **upd2)
    upd = {}
    upd.update(upd1)
    upd.update(upd2)
    assert flatmap == upd
Example #2
0
def test_Section_update3():
    upd1 = {'a': 1}
    upd2 = {'b': 2}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1, **upd2)
    upd = {}
    upd.update(upd1)
    upd.update(upd2)
    assert flatmap == upd
Example #3
0
def test_Section_update(dictionary, simple_config_content, string_io):
    section = Section(dictionary=dictionary)
    section.update(simple_config_content)
    section.dump(stream=string_io)
    assert string_io.getvalue() == SIMPLE_SECTION_DUMP
Example #4
0
def test_Section_update2():
    upd1 = {'a': 1}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1.items())
    assert flatmap == upd1
Example #5
0
def test_Section_update1():
    upd1 = {"a": 1}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1)
    assert flatmap == upd1
Example #6
0
def test_Section_update(dictionary, simple_config_content, string_io):
    section = Section(dictionary=dictionary)
    section.update(simple_config_content)
    section.dump(stream=string_io)
    assert string_io.getvalue() == SIMPLE_SECTION_DUMP
Example #7
0
def test_Section_update2():
    upd1 = {'a': 1}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1.items())
    assert flatmap == upd1