added a user system
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user