Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Share-target test usernames fit the 20-character column

Murtaza Nasir895cbbe658af
diff --git a/tests/test_share_target.py b/tests/test_share_target.py
index 7cae5a8e..37e0de6a 100644
--- a/tests/test_share_target.py
+++ b/tests/test_share_target.py
@@ -29,7 +29,8 @@ from src.models import User, Recording
def _setup_user(prefix):
suffix = uuid.uuid4().hex[:8]
user = User(
- username=f"{prefix}_{suffix}",
+ # The username column holds 20 characters (PostgreSQL enforces it)
+ username=f"{prefix[:11]}_{suffix}",
email=f"{prefix}_{suffix}@local.test",
password="x",
)