TeamspeakStats/tsstats/tests/test_config.py

21 lines
629 B
Python
Raw Normal View History

import pytest
2015-07-13 15:35:05 -04:00
from tsstats.config import load
2015-09-04 17:20:35 -04:00
2015-07-13 15:35:05 -04:00
@pytest.fixture
def config():
return load()
2015-07-13 15:35:05 -04:00
def test_config(config):
assert not config.getboolean('General', 'debug')
assert config.getboolean('General', 'onlinedc')
config.set('General', 'idmap', 'tsstats/tests/res/id_map.json')
assert config.get('General', 'idmap') ==\
'tsstats/tests/res/id_map.json'
config.set('General', 'log', 'tsstats/tests/res/test.log')
assert config.get('General', 'log') == 'tsstats/tests/res/test.log'
config.set('General', 'output', 'output.html')
assert config.get('General', 'output') == 'output.html'