added a user system

This commit is contained in:
2026-08-30 17:07:55 +08:00
parent 0b85a2ed57
commit 637101bcdb
13 changed files with 1082 additions and 20 deletions

View File

@@ -38,13 +38,20 @@ def make_client(tmp_path):
legacy_boundaries_file=index_path,
)
settings.ensure_directories()
return TestClient(
client = TestClient(
create_app(
BoundaryStore(index_path),
settings=settings,
repository=VideoRepository(settings.database_path),
)
)
response = client.post(
"/api/v1/auth/register",
json={"username": "tester", "password": "password-123"},
)
assert response.status_code == 201, response.text
client.headers.update({"Authorization": f"Bearer {response.json()['token']}"})
return client
def test_lookup_returns_boundaries(tmp_path):