Test reading config from disk again

This commit is contained in:
Thor77 2017-02-23 21:38:59 +01:00
parent 709c573b65
commit 962fd486af
1 changed files with 9 additions and 0 deletions

View File

@ -18,3 +18,12 @@ def test_config(config):
assert config.get('General', 'log') == 'tsstats/tests/res/test.log' assert config.get('General', 'log') == 'tsstats/tests/res/test.log'
config.set('General', 'output', 'output.html') config.set('General', 'output', 'output.html')
assert config.get('General', 'output') == 'output.html' assert config.get('General', 'output') == 'output.html'
def test_read():
config = load(path='tsstats/tests/res/config.ini')
# test defaults
assert not config.getboolean('General', 'debug')
# test written values
assert config.get('General', 'log') == 'tsstats/tests/res/test.log'
assert config.get('General', 'output') == 'tsstats/tests/res/output.html'