예제 #1
0
    def get_mysql_dbs(self):
        """Retrieve database names from MySQL.

        :returns: List of database names.
        :rtype: list
        """
        if not self.connected:
            raise ValueError(
                "AlchemyHandler currently not connected to MySQL.")
        databases = mysqldb_basic.get_mysql_dbs(self._engine)
        self._databases = list(databases)
예제 #2
0
 def test_get_mysql_dbs_2(self):
     """Verify set of databases is retrieved when engine
     is connected to a specific database."""
     databases = mysqldb_basic.get_mysql_dbs(self.engine)
     self.assertTrue(DB in databases)