diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39892f8..7f1518f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,6 @@ jobs: --extras redis --no-interaction - env: - POSTGRES_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/test + POSTGRES_URL: postgresql+psycopg://postgres:postgres@postgres:5432/test REDIS_URL: redis://default:password@redis:6379/0 run: poetry run pytest diff --git a/tests/ext/data/sqlalchemy/test_environment_variables.py b/tests/ext/data/sqlalchemy/test_environment_variables.py index d75b5fd..14334d4 100644 --- a/tests/ext/data/sqlalchemy/test_environment_variables.py +++ b/tests/ext/data/sqlalchemy/test_environment_variables.py @@ -22,9 +22,9 @@ async def test_database_url_from_environment_variables(monkeypatch): @pytest.mark.skipif(SA_DB_URL is None, reason="POSTGRES_URL not defined") -@pytest.mark.skipif(find_spec("asyncpg") is None, reason="asyncpg not present") +@pytest.mark.skipif(find_spec("psycopg") is None, reason="psycopg not present") async def test_database_url_username_password_from_environment_variables(monkeypatch): - url = f"postgresql+asyncpg://{SA_DB_URL.host}:{SA_DB_URL.port}/{SA_DB_URL.database}" + url = f"postgresql+psycopg://{SA_DB_URL.host}:{SA_DB_URL.port}/{SA_DB_URL.database}" username = SA_DB_URL.username password = SA_DB_URL.password @@ -39,9 +39,9 @@ async def test_database_url_username_password_from_environment_variables(monkeyp @pytest.mark.skipif(SA_DB_URL is None, reason="POSTGRES_URL not defined") -@pytest.mark.skipif(find_spec("asyncpg") is None, reason="asyncpg not present") +@pytest.mark.skipif(find_spec("psycopg") is None, reason="psycopg not present") async def test_database_url_components_from_environment_variables(monkeypatch): - drivername = "postgresql+asyncpg" + drivername = "postgresql+psycopg" host = SA_DB_URL.host port = str(SA_DB_URL.port) database = SA_DB_URL.database diff --git a/tests/ext/data/sqlalchemy/test_service_postgres.py b/tests/ext/data/sqlalchemy/test_service_postgres.py index ef7226f..d1eece8 100644 --- a/tests/ext/data/sqlalchemy/test_service_postgres.py +++ b/tests/ext/data/sqlalchemy/test_service_postgres.py @@ -17,7 +17,7 @@ pytestmark = [ pytest.mark.skipif(POSTGRES_URL is None, reason="POSTGRES_URL not defined"), - pytest.mark.skipif(find_spec("asyncpg") is None, reason="asyncpg not present"), + pytest.mark.skipif(find_spec("psycopg") is None, reason="psycopg not present"), ] SA_DB_URL = make_url(POSTGRES_URL) if POSTGRES_URL else None @@ -47,7 +47,7 @@ async def test_make_engine_service_with_url_username_password(): "data": { "sqlalchemy": { "default": { - "url": f"postgresql+asyncpg://{SA_DB_URL.host}:{SA_DB_URL.port}/{SA_DB_URL.database}", + "url": f"postgresql+psycopg://{SA_DB_URL.host}:{SA_DB_URL.port}/{SA_DB_URL.database}", "username": SA_DB_URL.username, "password": SA_DB_URL.password, }, @@ -66,7 +66,7 @@ async def test_make_engine_service_with_url_components(): "data": { "sqlalchemy": { "default": { - "drivername": "postgresql+asyncpg", + "drivername": "postgresql+psycopg", "host": SA_DB_URL.host, "port": SA_DB_URL.port, "database": SA_DB_URL.database,