Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions tests/integration/dbapi/async/V2/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from random import choice, randint
import random
import string
from random import choice
from typing import Tuple

from pytest import fixture
Expand Down Expand Up @@ -120,7 +122,8 @@ async def service_account_no_user(
database_name: str,
) -> Tuple[str, Secret]:
# function-level fixture so we need to make sa name is unique
sa_account_name = f"{database_name}_sa_no_user_{randint(0, 1000)}"
randomness = "".join(random.choices(string.ascii_letters + string.digits, k=2))
sa_account_name = f"{database_name}_sa_no_user_{randomness}"
with connection_system_engine_no_db.cursor() as cursor:
await cursor.execute(
f'CREATE SERVICE ACCOUNT "{sa_account_name}" '
Expand Down
7 changes: 5 additions & 2 deletions tests/integration/dbapi/sync/V2/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from random import choice, randint
import random
import string
from random import choice
from typing import Tuple

from pytest import fixture
Expand Down Expand Up @@ -120,7 +122,8 @@ def service_account_no_user(
database_name: str,
) -> Tuple[str, Secret]:
# function-level fixture so we need to make sa name is unique
sa_account_name = f"{database_name}_sa_no_user_{randint(0, 1000)}"
randomness = "".join(random.choices(string.ascii_letters + string.digits, k=2))
sa_account_name = f"{database_name}_sa_no_user_{randomness}"
with connection_system_engine_no_db.cursor() as cursor:
cursor.execute(
f'CREATE SERVICE ACCOUNT "{sa_account_name}" '
Expand Down