예제 #1
0
 def test_delete_config(self):
     value = lib.set_config("test:section", "test.option", "testvalue")
     new_value = lib.delete_config("test:section", "test.option")
     assert new_value == ""
     #clean up
     dpm.CONFIG.remove_section("test:section")
     dpm.CONFIG.write(open(dpm.config.default_config_path,'w'))
예제 #2
0
 def test_delete_config(self):
     value = lib.set_config("test:section", "test.option", "testvalue")
     new_value = lib.delete_config("test:section", "test.option")
     assert new_value == ""
     #clean up
     dpm.CONFIG.remove_section("test:section")
     dpm.CONFIG.write(open(dpm.config.default_config_path, 'w'))
예제 #3
0
 def test_set_config(self):
     value = lib.set_config("test:section", "test.option", "testvalue")
     assert value == "testvalue"
     assert lib.get_config("test:section") == ["test.option"]
     #clean up
     dpm.CONFIG.remove_section("test:section")
     dpm.CONFIG.write(open(dpm.config.default_config_path,'w'))
예제 #4
0
 def test_set_config(self):
     value = lib.set_config("test:section", "test.option", "testvalue")
     assert value == "testvalue"
     assert lib.get_config("test:section") == ["test.option"]
     #clean up
     dpm.CONFIG.remove_section("test:section")
     dpm.CONFIG.write(open(dpm.config.default_config_path, 'w'))