class TestDefaultConfig(TestCase): def setUp(self): cp = ConfigParser.ConfigParser() cp.set('DEFAULT', 'test_key', 'test_value') self.default_conf = DefaultConfig(cp) def test_get(self): assert 'test_value' == self.default_conf.get('test_key') def test_make_params_for_template(self): out = self.default_conf.make_params_for_template(os.path.join(TEMPLATE_DIR, 'test_conf.ini')) assert 'test_key' in out assert out['test_key'] == 'test_value' assert 'chicharrones' in out assert out['chicharrones'] == None
def setUp(self): cp = ConfigParser.ConfigParser() cp.set('DEFAULT', 'test_key', 'test_value') self.default_conf = DefaultConfig(cp)