Exemple #1
0
    def _make_connection(self):
        from google.cloud.spanner_dbapi import Connection
        from google.cloud.spanner_v1.instance import Instance

        # We don't need a real Client object to test the constructor
        instance = Instance(self.INSTANCE, client=None)
        database = instance.database(self.DATABASE)
        return Connection(instance, database)
Exemple #2
0
 def _make_connection(self):
     # we don't need real Client object to test the constructor
     instance = Instance(self.instance_name, client=None)
     database = instance.database(self.database_name)
     return Connection(instance, database)