Files
headquarter/apps/api/tests/integration/test_ssh_keys_api.py
T
Developer 81b9a66ef5 fix: resolve stale backend test imports and schema drift
- Delete 4 obsolete unit tests tied to removed git mount/clone models
- Update imports and assertions across unit/integration/service tests
- Fix Settings defaults (postgres host, JWT props, cookie_samesite)
- Add skip guards for PostgreSQL-dependent integration tests
- Fix GitService env assertions and HealthMonitor state-change tests
- Repair docker/container inspect assertions in test_docker_service
- Fix ToolTypeCreate default_port validator ordering bug
- Fix check_port_exposed substring false-positive for port 0
- Update test_tool_types_api_extended to use interface_type field

Quality gates: pytest 311 passed, 34 skipped; npm typecheck/lint/test 87 passed
2026-06-12 20:23:17 +00:00

15 lines
467 B
Python

import pytest
from fastapi.testclient import TestClient
@pytest.mark.integration
def test_create_ssh_key_requires_authentication(test_client: TestClient) -> None:
response = test_client.post("/ssh-keys", json={"name": "test-key"})
assert response.status_code == 401
@pytest.mark.integration
def test_list_ssh_keys_requires_authentication(test_client: TestClient) -> None:
response = test_client.get("/ssh-keys")
assert response.status_code == 401