feat: Initialize frontend with React, Vite, and Tailwind CSS
- Set up main entry point for React application. - Create About, Home, NotFound, Privacy, and Terms pages with SEO support. - Implement API service for file uploads and task management. - Add global styles using Tailwind CSS. - Create utility functions for SEO and text processing. - Configure Vite for development and production builds. - Set up Nginx configuration for serving frontend and backend. - Add scripts for cleanup of expired files and sitemap generation. - Implement deployment script for production environment.
This commit is contained in:
27
backend/tests/test_image.py
Normal file
27
backend/tests/test_image.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Tests for image conversion & resize endpoints."""
|
||||
import io
|
||||
|
||||
|
||||
def test_image_convert_no_file(client):
|
||||
"""POST /api/image/convert without file should return 400."""
|
||||
response = client.post('/api/image/convert')
|
||||
assert response.status_code == 400
|
||||
|
||||
|
||||
def test_image_resize_no_file(client):
|
||||
"""POST /api/image/resize without file should return 400."""
|
||||
response = client.post('/api/image/resize')
|
||||
assert response.status_code == 400
|
||||
|
||||
|
||||
def test_image_convert_wrong_type(client):
|
||||
"""POST /api/image/convert with non-image should return 400."""
|
||||
data = {
|
||||
'file': (io.BytesIO(b'not an image'), 'test.pdf'),
|
||||
}
|
||||
response = client.post(
|
||||
'/api/image/convert',
|
||||
data=data,
|
||||
content_type='multipart/form-data',
|
||||
)
|
||||
assert response.status_code == 400
|
||||
Reference in New Issue
Block a user