mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-22 21:44:20 +00:00
test: format test suite
This commit is contained in:
@@ -44,6 +44,7 @@ class TestStartupFlow:
|
||||
|
||||
# Database should have some tables after migration
|
||||
import sqlite3
|
||||
|
||||
conn = sqlite3.connect(str(e2e_db_path))
|
||||
cursor = conn.cursor()
|
||||
|
||||
@@ -74,10 +75,13 @@ class TestStartupFlow:
|
||||
def test_auth_endpoint(self, e2e_client, e2e_tmpdir):
|
||||
"""Test auth endpoint."""
|
||||
# First startup may allow initial setup
|
||||
response = e2e_client.post('/api/v1/user/auth', json={
|
||||
'user': 'admin',
|
||||
'password': 'admin',
|
||||
})
|
||||
response = e2e_client.post(
|
||||
'/api/v1/user/auth',
|
||||
json={
|
||||
'user': 'admin',
|
||||
'password': 'admin',
|
||||
},
|
||||
)
|
||||
|
||||
# Response could be:
|
||||
# - 200 if auth succeeds
|
||||
@@ -97,6 +101,7 @@ class TestStartupStages:
|
||||
def test_migrations_applied(self, langbot_process, e2e_db_path):
|
||||
"""Verify database migrations were applied."""
|
||||
import sqlite3
|
||||
|
||||
conn = sqlite3.connect(str(e2e_db_path))
|
||||
cursor = conn.cursor()
|
||||
|
||||
|
||||
@@ -176,4 +176,4 @@ def create_test_directories(tmpdir: Path) -> dict[str, Path]:
|
||||
for path in directories.values():
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
return directories
|
||||
return directories
|
||||
|
||||
@@ -90,9 +90,11 @@ precision = 2
|
||||
f.write(coveragerc_content)
|
||||
|
||||
cmd = [
|
||||
'coverage', 'run',
|
||||
'coverage',
|
||||
'run',
|
||||
'--rcfile=' + str(coveragerc_path),
|
||||
'-m', 'langbot',
|
||||
'-m',
|
||||
'langbot',
|
||||
]
|
||||
else:
|
||||
cmd = ['uv', 'run', 'python', '-m', 'langbot']
|
||||
|
||||
Reference in New Issue
Block a user