Add POI feature and imporve the overall backend implementation
This commit is contained in:
@@ -6,10 +6,14 @@ Tests the complete deletion flow across all 12 microservices
|
||||
import asyncio
|
||||
import pytest
|
||||
import httpx
|
||||
import os
|
||||
from typing import Dict, List, Any
|
||||
from uuid import uuid4
|
||||
from datetime import timedelta
|
||||
import structlog
|
||||
|
||||
from shared.auth.jwt_handler import JWTHandler
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
|
||||
@@ -37,9 +41,20 @@ TEST_TENANT_ID = "dbc2128a-7539-470c-94b9-c1e37031bd77" # Demo tenant
|
||||
@pytest.fixture
|
||||
async def service_token():
|
||||
"""Get a service JWT token for authentication"""
|
||||
# TODO: Implement actual token generation
|
||||
# For now, use environment variable or mock
|
||||
return "service_token_placeholder"
|
||||
# Get JWT secret from environment or use default for testing
|
||||
jwt_secret = os.getenv("JWT_SECRET", "test-secret-key-for-integration-tests-only")
|
||||
|
||||
# Create JWT handler
|
||||
jwt_handler = JWTHandler(secret_key=jwt_secret)
|
||||
|
||||
# Generate service token with 1 hour expiration for tests
|
||||
token = jwt_handler.create_service_token(
|
||||
service_name="integration-test-service",
|
||||
expires_delta=timedelta(hours=1)
|
||||
)
|
||||
|
||||
logger.info("Generated service token for integration tests")
|
||||
return token
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user