def test_database_config(self):
        open_ihm_config = OpenHEAConfig()

        expected = {
            'host': 'localhost',
            'database': 'openheadb',
            'user': '******',
            'password': '******',
            'port': 3306,
            'superuser': '******',
            'superuser_password': '',
        }
        self.assertEqual(expected, open_ihm_config.database_config())
    def test_read_config_file_port_default(self):
        open_ihm_config = OpenHEAConfig()
        config_file = """
[database]
superuser = master
superuser_password = password
        """
        open_ihm_config.readfp(io.BytesIO(config_file))
        expected = {
            'host': 'localhost',
            'database': 'openheadb',
            'user': '******',
            'password': '******',
            'port': 3306,
            'superuser': '******',
            'superuser_password': '******',
        }
        self.assertEqual(expected, open_ihm_config.database_config())