Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 4
0
def test_Section_update2():
    upd1 = {'a': 1}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1.items())
    assert flatmap == upd1
Esempio n. 5
0
def test_Section_update1():
    upd1 = {"a": 1}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1)
    assert flatmap == upd1
Esempio n. 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
Esempio n. 7
0
def test_Section_update2():
    upd1 = {'a': 1}
    flatmap = Section(dictionary=collections.OrderedDict())
    flatmap.update(upd1.items())
    assert flatmap == upd1