apigateway / tests /e2e /test_misc_e2e.py
jebin2's picture
feat: Add comprehensive E2E testing framework with authenticated flows
3e6248e
"""
E2E Tests for Blink and Contact Endpoints
Tests miscellaneous endpoints.
"""
import pytest
class TestBlinkE2E:
"""Test /blink endpoint."""
def test_blink_requires_auth(self, api_client):
"""Blink endpoint requires authentication."""
response = api_client.get("/blink?userid=12345678901234567890test")
# Blink is now protected by auth middleware
assert response.status_code == 401
def test_blink_post_requires_auth(self, api_client):
"""Blink POST requires authentication."""
response = api_client.post("/blink", json={
"page": "/test",
"action": "click"
})
assert response.status_code == 401
class TestContactE2E:
"""Test /contact endpoint."""
def test_contact_requires_auth(self, api_client):
"""Contact submission requires authentication."""
response = api_client.post("/contact", json={
"message": "Test message",
"subject": "Test subject"
})
assert response.status_code == 401
class TestDatabaseE2E:
"""Test /api/data endpoint."""
def test_data_requires_auth(self, api_client):
"""Data endpoint requires authentication."""
response = api_client.get("/api/data")
# Data endpoint is protected
assert response.status_code == 401