summaryrefslogtreecommitdiffstats
path: root/tests/test_configparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_configparser.py')
-rw-r--r--tests/test_configparser.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/tests/test_configparser.py b/tests/test_configparser.py
index 29ba9e51b..d797c7912 100644
--- a/tests/test_configparser.py
+++ b/tests/test_configparser.py
@@ -14,14 +14,32 @@ class TestConfigParser():
cls.db = DatabaseBackend(Core())
cls.db.manager = cls.db.core
cls.db.manager.statusMsg = defaultdict(lambda: "statusmsg")
- cls.config = ConfigParser
+ cls.config = ConfigParser()
+ cls.db.setup()
+ cls.db.clearAllConfigs()
def test_db(self):
- pass
+
+ self.db.saveConfig("plugin", "some value", 0)
+ self.db.saveConfig("plugin", "some other value", 1)
+
+ assert self.db.loadConfig("plugin", 0) == "some value"
+ assert self.db.loadConfig("plugin", 1) == "some other value"
+
+ d = self.db.loadAllConfigs()
+ assert d[0]["plugin"] == "some value"
+
+ self.db.deleteConfig("plugin")
+
+ assert not self.db.loadAllConfigs()
+
def test_dict(self):
- pass
+
+ assert self.config["general"]["language"]
+ self.config["general"]["language"] = "de"
+ assert self.config["general"]["language"] == "de"
def test_config(self):
pass