mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-16 23:07:14 +00:00
fix(ci): fix ruff lint errors and postgres legacy migration table exclusion
This commit is contained in:
@@ -8,14 +8,10 @@ from unittest.mock import AsyncMock, Mock
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.integration.api.test_smoke import (
|
||||
fake_api_app,
|
||||
mock_circular_import_chain,
|
||||
quart_test_client,
|
||||
)
|
||||
pytest_plugins = ['tests.integration.api.test_smoke']
|
||||
|
||||
|
||||
pytestmark = [pytest.mark.integration, pytest.mark.usefixtures('mock_circular_import_chain')]
|
||||
pytestmark = pytest.mark.integration
|
||||
|
||||
|
||||
class TestPasskeyPublicEndpoints:
|
||||
|
||||
@@ -550,11 +550,13 @@ class TestPostgreSQLWorkspaceMigration:
|
||||
)
|
||||
assert 'workspaces' not in tables_before_migration
|
||||
assert 'codex_credentials' not in tables_before_migration
|
||||
assert 'passkey_credentials' not in tables_before_migration
|
||||
|
||||
await manager._initialize_managed_schema()
|
||||
|
||||
async with postgres_engine.connect() as conn:
|
||||
assert 'codex_credentials' in await conn.run_sync(lambda sync: sa.inspect(sync).get_table_names())
|
||||
assert 'passkey_credentials' in await conn.run_sync(lambda sync: sa.inspect(sync).get_table_names())
|
||||
account = (await conn.execute(text('SELECT uuid, status, source FROM users'))).mappings().one()
|
||||
workspace = (
|
||||
(await conn.execute(text('SELECT * FROM workspaces WHERE source = :source'), {'source': 'local'}))
|
||||
|
||||
Reference in New Issue
Block a user