From 60d159fd39478f59914723042cf198cdd99ea95c Mon Sep 17 00:00:00 2001 From: John Dickinson Date: Fri, 8 Oct 2010 14:55:43 -0500 Subject: [PATCH] updated readconf test --- test/unit/common/test_utils.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py index 11f0fa5bcf..92be1077c0 100644 --- a/test/unit/common/test_utils.py +++ b/test/unit/common/test_utils.py @@ -257,22 +257,21 @@ log_name = yarr''' f.write(conf) f.close() result = utils.readconf('/tmp/test') - expected = {'section1': {'foo': 'bar'}, 'section2': {'log_name': 'yarr'}} + expected = {'log_name': None, + 'section1': {'foo': 'bar'}, + 'section2': {'log_name': 'yarr'}} self.assertEquals(result, expected) result = utils.readconf('/tmp/test', 'section1') - expected = {'foo': 'bar'} + expected = {'log_name': 'section1', 'foo': 'bar'} self.assertEquals(result, expected) result = utils.readconf('/tmp/test', 'section2').get('log_name') expected = 'yarr' self.assertEquals(result, expected) - result = utils.readconf('/tmp/test', 'section1').get('log_name') - expected = 'section1' - self.assertEquals(result, expected) result = utils.readconf('/tmp/test', 'section1', log_name='foo').get('log_name') expected = 'foo' self.assertEquals(result, expected) result = utils.readconf('/tmp/test', 'section1', defaults={'bar': 'baz'}) - expected = {'foo': 'bar', 'bar': 'baz'} + expected = {'log_name': 'section1', 'foo': 'bar', 'bar': 'baz'} self.assertEquals(result, expected) os.unlink('/tmp/test')