Update tests for the latest changes.

This commit is contained in:
2026-02-05 19:26:20 +00:00
parent 3469e6fa3f
commit 250189dbe5
3 changed files with 6 additions and 11 deletions
+3 -8
View File
@@ -39,7 +39,6 @@ from paskia.db.operations import DB
from paskia.fastapi.mainapp import app
from paskia.fastapi.session import AUTH_COOKIE_NAME
from paskia.sansio import Passkey
from paskia.util.passphrase import generate
@pytest.fixture(scope="session")
@@ -181,7 +180,7 @@ async def session_token(
return create_session(
user_uuid=test_user.uuid,
credential_uuid=test_credential.uuid,
host="localhost:4401",
host="localhost",
ip="127.0.0.1",
user_agent="pytest",
expiry=expires(),
@@ -196,7 +195,7 @@ async def regular_session_token(
return create_session(
user_uuid=regular_user.uuid,
credential_uuid=regular_credential.uuid,
host="localhost:4401",
host="localhost",
ip="127.0.0.1",
user_agent="pytest",
expiry=expires(),
@@ -206,15 +205,11 @@ async def regular_session_token(
@pytest_asyncio.fixture(scope="function")
async def reset_token(test_db: DB, test_user: User, test_credential: Credential) -> str:
"""Create a reset token for the test user."""
token = generate()
create_reset_token(
return create_reset_token(
user_uuid=test_user.uuid,
passphrase=token,
expiry=reset_expires(),
token_type="reset",
)
return token
@pytest_asyncio.fixture(scope="function")
+2 -2
View File
@@ -101,7 +101,7 @@ async def second_org_session_token(
return create_session(
user_uuid=second_org_user.uuid,
credential_uuid=second_org_credential.uuid,
host="localhost:4401",
host="localhost",
ip="127.0.0.1",
user_agent="pytest",
expiry=expires(),
@@ -158,7 +158,7 @@ async def org_admin_session_token(
return create_session(
user_uuid=org_admin_user.uuid,
credential_uuid=org_admin_credential.uuid,
host="localhost:4401",
host="localhost",
ip="127.0.0.1",
user_agent="pytest",
expiry=expires(),
+1 -1
View File
@@ -526,7 +526,7 @@ class TestValidateSessionRefresh:
token = create_session(
user_uuid=test_user.uuid,
credential_uuid=test_credential.uuid,
host="localhost:4401",
host="localhost",
ip="127.0.0.1",
user_agent="pytest",
expiry=old_expiry,