Files
Reklamator/config/testing.py
T

38 lines
908 B
Python
Raw Normal View History

"""Testing configuration"""
import os
import tempfile
class TestingConfig:
"""Testing environment configuration"""
DEBUG = False
TESTING = True
# Security
SECRET_KEY = 'test-secret-key'
# Paths - use temporary directory
DATA_DIR = tempfile.mkdtemp()
# Flask-WTF CSRF - disabled for easier testing
WTF_CSRF_ENABLED = False
# File Upload
MAX_CONTENT_LENGTH = 10 * 1024 * 1024 # 10MB
# AI Integration - mock in tests
ANTHROPIC_API_KEY = 'test-api-key'
# ClamAV - mock in tests
CLAMD_SOCKET = '/tmp/test-clamd.ctl'
# Rate Limiting - disabled for testing
RATELIMIT_ENABLED = False
RATELIMIT_STORAGE_URL = 'memory://'
RATELIMIT_PER_HOUR = 1000 # High limit for testing
# Session
SESSION_COOKIE_SECURE = False
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
PERMANENT_SESSION_LIFETIME = 86400