Skip to content

Commit b24e0ca

Browse files
Fix auth test to accept both 401 and 403
Match codebase pattern for version-dependent HTTPBearer status codes. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent feb82fc commit b24e0ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tests/_internal/server/routers/test_templates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def _reset_cache():
2828

2929
class TestListTemplates:
3030
@pytest.mark.asyncio
31-
async def test_returns_403_if_not_authenticated(self, test_db, client: AsyncClient):
31+
async def test_returns_40x_if_not_authenticated(self, test_db, client: AsyncClient):
3232
response = await client.post("/api/project/test_project/templates/list")
33-
assert response.status_code == 403
33+
assert response.status_code in [401, 403]
3434

3535
@pytest.mark.asyncio
3636
async def test_returns_empty_list_when_no_repo(

0 commit comments

Comments
 (0)