fix: resolve email_inbound_token conflict in test fixtures
CI / lint (pull_request) Failing after 7s
CI / typecheck (pull_request) Failing after 31s
CI / test (pull_request) Failing after 49s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
CI / lint (pull_request) Failing after 7s
CI / typecheck (pull_request) Failing after 31s
CI / test (pull_request) Failing after 49s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
This commit is contained in:
+3
-4
@@ -177,10 +177,8 @@ async def _create_test_user_and_session(
|
|||||||
async with db_engine.begin() as conn:
|
async with db_engine.begin() as conn:
|
||||||
await conn.execute(
|
await conn.execute(
|
||||||
text(
|
text(
|
||||||
"INSERT INTO users (id, email, hashed_password, display_name, "
|
"INSERT INTO users (id, email, hashed_password, display_name, email_verified, email_inbound_token, created_at, updated_at) "
|
||||||
"email_verified, created_at, updated_at) "
|
"VALUES (:id, :email, :hashed_password, :display_name, :email_verified, :email_inbound_token, :created_at, :updated_at)"
|
||||||
"VALUES (:id, :email, :hashed_password, :display_name, :email_verified, "
|
|
||||||
":created_at, :updated_at)"
|
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
"id": user_id,
|
"id": user_id,
|
||||||
@@ -188,6 +186,7 @@ async def _create_test_user_and_session(
|
|||||||
"hashed_password": "not-used-with-better-auth",
|
"hashed_password": "not-used-with-better-auth",
|
||||||
"display_name": display_name,
|
"display_name": display_name,
|
||||||
"email_verified": False,
|
"email_verified": False,
|
||||||
|
"email_inbound_token": secrets.token_urlsafe(16),
|
||||||
"created_at": now,
|
"created_at": now,
|
||||||
"updated_at": now,
|
"updated_at": now,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -138,9 +138,8 @@ async def test_expired_session_rejected(client, db_engine):
|
|||||||
async with db_engine.begin() as conn:
|
async with db_engine.begin() as conn:
|
||||||
await conn.execute(
|
await conn.execute(
|
||||||
text(
|
text(
|
||||||
"INSERT INTO users (id, email, hashed_password, display_name, "
|
"INSERT INTO users (id, email, hashed_password, display_name, email_verified, email_inbound_token, created_at, updated_at) "
|
||||||
"email_verified, created_at, updated_at) "
|
"VALUES (:id, :email, :hp, :dn, :ev, :token, :ca, :ua)"
|
||||||
"VALUES (:id, :email, :hp, :dn, :ev, :ca, :ua)"
|
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
"id": user_id,
|
"id": user_id,
|
||||||
@@ -148,6 +147,7 @@ async def test_expired_session_rejected(client, db_engine):
|
|||||||
"hp": "unused",
|
"hp": "unused",
|
||||||
"dn": "Expired User",
|
"dn": "Expired User",
|
||||||
"ev": False,
|
"ev": False,
|
||||||
|
"token": secrets.token_urlsafe(16),
|
||||||
"ca": now,
|
"ca": now,
|
||||||
"ua": now,
|
"ua": now,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -64,17 +64,17 @@ class TestSessionValidation:
|
|||||||
|
|
||||||
async with db_engine.begin() as conn:
|
async with db_engine.begin() as conn:
|
||||||
await conn.execute(
|
await conn.execute(
|
||||||
text(
|
text(
|
||||||
"INSERT INTO users (id, email, hashed_password, display_name, "
|
"INSERT INTO users (id, email, hashed_password, display_name, email_verified, email_inbound_token, created_at, updated_at) "
|
||||||
"email_verified, created_at, updated_at) "
|
"VALUES (:id, :email, :hp, :dn, :ev, :token, :ca, :ua)"
|
||||||
"VALUES (:id, :email, :hp, :dn, :ev, :ca, :ua)"
|
),
|
||||||
),
|
|
||||||
{
|
{
|
||||||
"id": user_id,
|
"id": user_id,
|
||||||
"email": "expired@e2e.com",
|
"email": "expired@e2e.com",
|
||||||
"hp": "unused",
|
"hp": "unused",
|
||||||
"dn": "Expired User",
|
"dn": "Expired User",
|
||||||
"ev": False,
|
"ev": False,
|
||||||
|
"token": secrets.token_urlsafe(16),
|
||||||
"ca": now,
|
"ca": now,
|
||||||
"ua": now,
|
"ua": now,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user