"""Integration: notification config and test — Go/Gin backend.""" import pytest from httpx import AsyncClient from tests.conftest import auth_header class TestNotificationConfig: async def test_full_notification_flow(self, client: AsyncClient, admin_token: str): import uuid suffix = uuid.uuid4().hex[:6] # Create resp = await client.post("/api/v1/notifications", headers=auth_header(admin_token), json={ "name": f"test-ch-{suffix}", "channel_type": "webhook_feishu", "config": {"webhook_url": "https://example.com/test"}, "is_enabled": False, }) assert resp.status_code == 200 ch_id = resp.json()["id"] # Update resp = await client.put( f"/api/v1/notifications/{ch_id}", headers=auth_header(admin_token), json={"name": f"updated-ch-{suffix}"}, ) assert resp.status_code == 200 # Delete resp = await client.delete( f"/api/v1/notifications/{ch_id}", headers=auth_header(admin_token), ) assert resp.status_code == 200