From 6889946ab67608f6e54fcd415979039bec4e1e20 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Mon, 9 May 2016 19:34:13 +0200 Subject: [PATCH] use py2-style ConfigParser-set and section_add in tests --- tsstats/tests/test_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tsstats/tests/test_config.py b/tsstats/tests/test_config.py index 279b838..5a561ab 100644 --- a/tsstats/tests/test_config.py +++ b/tsstats/tests/test_config.py @@ -16,7 +16,9 @@ configpath = abspath('tsstats/tests/res/test.cfg') def create_config(values, key='General'): config = ConfigParser() - config[key] = values + config.add_section('General') + for option, value in values.items(): + config.set('General', option, value) with open(configpath, 'w') as configfile: config.write(configfile)