Implement MVP: Anonymous feedback submission (User Story 1)
Complete implementation of Phase 1-3 (64 tasks): - Phase 1: Project setup with Flask, pytest, configuration - Phase 2: Core infrastructure (auth, models, services, testing) - Phase 3: Anonymous feedback submission with file uploads Features: - Anonymous feedback submission (text and/or up to 3 file attachments) - Multi-language support (any language accepted) - File validation (type, size) and virus scanning (ClamAV) - Product management with active/archived status - File-based storage with YAML metadata - User authentication system (Flask-Login) - CSRF protection and rate limiting - Test coverage: 10 passing tests (contract + integration) Security: - No IP address logging (FR-055 compliance) - File type whitelist and size limits (10MB max) - Virus scanning with graceful degradation - Filename sanitization and secure storage Test Results: - 8 contract tests passed - 2 integration tests passed - End-to-end workflow verified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user