Beispiel #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
 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')
 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
Beispiel #4
0
    def test_init(self):
        """Tests the Database init method"""

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

        self.assertEqual(
            'db',
            database.Database(con, 'db').name
        )
Beispiel #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()
        )