import pytest from thoughtsync.app import create_app @pytest.fixture def app(): return create_app() async def test_labels_requires_auth(app): client = app.test_client() resp = await client.get("/api/labels") assert resp.status_code == 401 async def test_set_note_labels_requires_auth(app): client = app.test_client() resp = await client.put( "/api/notes/00000000-0000-0000-0000-000000000000/labels", json={"label_ids": []}, ) assert resp.status_code == 401