Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions tests/system/test_connector_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import os
from threading import Thread

import google.auth
import pymysql
import pytest
import sqlalchemy
Expand Down Expand Up @@ -50,20 +49,6 @@ def getconn() -> pymysql.connections.Connection:
return pool


def test_connector_with_credentials() -> None:
"""Test Connector object connection with credentials loaded from file."""
credentials, _ = google.auth.load_credentials_from_file(
os.environ["GOOGLE_APPLICATION_CREDENTIALS"]
)
with Connector(credentials=credentials) as connector:
pool = init_connection_engine(connector)

with pool.connect() as conn:
result = conn.execute(sqlalchemy.text("SELECT 1")).fetchone()
assert isinstance(result[0], int)
assert result[0] == 1


def test_multiple_connectors() -> None:
"""Test that same Cloud SQL instance can connect with two Connector objects."""
first_connector = Connector()
Expand Down
Loading