diff --git a/google/cloud/alloydb/connector/enums.py b/google/cloud/alloydb/connector/enums.py index eab5a63a..b1b2086b 100644 --- a/google/cloud/alloydb/connector/enums.py +++ b/google/cloud/alloydb/connector/enums.py @@ -22,9 +22,9 @@ class IPTypes(Enum): Enum for specifying IP type to connect to AlloyDB with. """ - PUBLIC: str = "PUBLIC" - PRIVATE: str = "PRIVATE" - PSC: str = "PSC" + PUBLIC = "PUBLIC" + PRIVATE = "PRIVATE" + PSC = "PSC" @classmethod def _missing_(cls, value: object) -> None: @@ -39,8 +39,8 @@ class RefreshStrategy(Enum): Enum for specifying refresh strategy to connect to AlloyDB with. """ - LAZY: str = "LAZY" - BACKGROUND: str = "BACKGROUND" + LAZY = "LAZY" + BACKGROUND = "BACKGROUND" @classmethod def _missing_(cls, value: object) -> None: diff --git a/requirements-test.txt b/requirements-test.txt index d0c14928..605dd99b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,15 @@ asyncpg==0.30.0 mock==5.1.0 pg8000==1.31.2 + +# psycopg 2.9.10 isn't supported on Python 3.9 for macos-latest GitHub runner. +# It is supported for macos-12 runner: +# https://github.com/psycopg/psycopg2/issues/1737. But macos-12 runner is +# deprecated: https://github.com/actions/runner-images/issues/10721. So we +# install psycopg 2.9.9 on Python 3.9 for macos-latest runner. +psycopg2-binary==2.9.9; python_version == "3.9" and sys_platform == "darwin" +psycopg2-binary==2.9.10; python_version != "3.9" or sys_platform != "darwin" + pytest==8.3.4 pytest-asyncio==0.24.0 pytest-cov==6.0.0 diff --git a/docs/samples/test_psycopg2_direct_connection.py b/tests/system/test_psycopg2_direct_connection.py similarity index 100% rename from docs/samples/test_psycopg2_direct_connection.py rename to tests/system/test_psycopg2_direct_connection.py