Example #1
0
 def __init__(self, uri, host, port, path, user, password):
     UriDatabaseConnection.__init__(self,
                                    dbms='postgresql',
                                    database=path,
                                    uri=uri,
                                    host=host,
                                    port=port,
                                    user=user,
                                    password=password,
                                    subtitle='PostgreSQL Connection')
     self._databases = None
Example #2
0
 def __init__(self, uri, host, port, path, user, password):
     UriDatabaseConnection.__init__(
         self,
         dbms='mysql',
         database=path,
         uri=uri,
         host=host,
         port=port,
         user=user,
         password=password,
         subtitle='MySQL Connection')
Example #3
0
 def __init__(self, uri, host, port, path, user, password):
     UriDatabaseConnection.__init__(
         self,
         dbms='postgresql',
         database=path,
         uri=uri,
         host=host,
         port=port,
         user=user,
         password=password,
         subtitle='PostgreSQL Connection')
     self._databases = None
Example #4
0
    def test_init(self):
        """Tests the Database init method"""

        con = UriDatabaseConnection(user='******', host='host')

        self.assertEqual(
            'db',
            database.Database(con, 'db').name
        )
Example #5
0
    def test_autocomplete(self):
        """Tests the Database autocomplete method"""

        con = UriDatabaseConnection(user='******', host='host')

        self.assertEqual(
            'user@host/db/',
            database.Database(
                con,
                'db').autocomplete()
        )