rewrite config-tests to work with new return-value of tsstats.config.load
* bump version to 0.10.1
This commit is contained in:
parent
708f071033
commit
87f9bf43fc
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='tsstats',
|
name='tsstats',
|
||||||
version='0.10.0',
|
version='0.10.1',
|
||||||
author='Thor77',
|
author='Thor77',
|
||||||
author_email='thor77@thor77.org',
|
author_email='thor77@thor77.org',
|
||||||
description='A simple Teamspeak stats-generator',
|
description='A simple Teamspeak stats-generator',
|
||||||
|
|
|
@ -8,7 +8,7 @@ from os.path import abspath, exists
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from tsstats.config import parse_config
|
from tsstats.config import load
|
||||||
|
|
||||||
configpath = abspath('tsstats/tests/res/test.cfg')
|
configpath = abspath('tsstats/tests/res/test.cfg')
|
||||||
|
|
||||||
|
@ -38,9 +38,10 @@ def test_config(config):
|
||||||
'debug': 'true',
|
'debug': 'true',
|
||||||
'onlinedc': 'false'
|
'onlinedc': 'false'
|
||||||
})
|
})
|
||||||
idmap, log, output, debug, onlinedc = parse_config(configpath)
|
configuration = load(configpath)
|
||||||
assert idmap == 'tsstats/tests/res/id_map.json'
|
assert configuration.get('General', 'idmap') ==\
|
||||||
assert log == 'tsstats/tests/res/test.log'
|
'tsstats/tests/res/id_map.json'
|
||||||
assert output == 'output.html'
|
assert configuration.get('General', 'log') == 'tsstats/tests/res/test.log'
|
||||||
assert debug is True
|
assert configuration.get('General', 'output') == 'output.html'
|
||||||
assert onlinedc is False
|
assert configuration.getboolean('General', 'debug') is True
|
||||||
|
assert configuration.getboolean('General', 'onlinedc') is False
|
||||||
|
|
Loading…
Reference in New Issue