From 87f9bf43fc0fe79bab6c2b95521a449c4aa40a20 Mon Sep 17 00:00:00 2001
From: Thor77 <thor77@thor77.org>
Date: Sat, 6 Aug 2016 21:39:36 +0200
Subject: [PATCH] rewrite config-tests to work with new return-value of
 tsstats.config.load

* bump version to 0.10.1
---
 setup.py                     |  2 +-
 tsstats/tests/test_config.py | 15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/setup.py b/setup.py
index 4614435..d6b972a 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
 
 setup(
     name='tsstats',
-    version='0.10.0',
+    version='0.10.1',
     author='Thor77',
     author_email='thor77@thor77.org',
     description='A simple Teamspeak stats-generator',
diff --git a/tsstats/tests/test_config.py b/tsstats/tests/test_config.py
index 15b361f..e76397f 100644
--- a/tsstats/tests/test_config.py
+++ b/tsstats/tests/test_config.py
@@ -8,7 +8,7 @@ from os.path import abspath, exists
 
 import pytest
 
-from tsstats.config import parse_config
+from tsstats.config import load
 
 configpath = abspath('tsstats/tests/res/test.cfg')
 
@@ -38,9 +38,10 @@ def test_config(config):
         'debug': 'true',
         'onlinedc': 'false'
     })
-    idmap, log, output, debug, onlinedc = parse_config(configpath)
-    assert idmap == 'tsstats/tests/res/id_map.json'
-    assert log == 'tsstats/tests/res/test.log'
-    assert output == 'output.html'
-    assert debug is True
-    assert onlinedc is False
+    configuration = load(configpath)
+    assert configuration.get('General', 'idmap') ==\
+        'tsstats/tests/res/id_map.json'
+    assert configuration.get('General', 'log') == 'tsstats/tests/res/test.log'
+    assert configuration.get('General', 'output') == 'output.html'
+    assert configuration.getboolean('General', 'debug') is True
+    assert configuration.getboolean('General', 'onlinedc') is False