def test_no_global_section(self): config = ConfigParser() file_name = os.path.join(self.test_dir,"file") with open(file_name, 'wt') as fp: fp.write("user2 = mysql") config.read(file_name) value = config.get("global", "user2") assert value == "mysql"
def test_no_global_section(self): config = ConfigParser() file_name = os.path.join(self.test_dir, "file") with open(file_name, 'wt') as fp: fp.write("user2 = mysql") config.read(file_name) value = config.get("global", "user2") assert value == "mysql"
def test_whitespace_as_underscore(self): config = ConfigParser() file_name = os.path.join(self.test_dir, "file") with open(file_name, 'wt') as fp: fp.write("[mysqld]\n") fp.write("user_2 = mysql\n") config.read(file_name) value = config.get("mysqld", "user_2") assert value == "mysql"
def test_whitespace_as_underscore(self): config = ConfigParser() file_name = os.path.join(self.test_dir,"file") with open(file_name, 'wt') as fp: fp.write("[mysqld]\n") fp.write("user_2 = mysql\n") config.read(file_name) value = config.get("mysqld", "user_2") assert value == "mysql"