Add tests for event theme API functionality
Introduces comprehensive tests for creating, listing, updating, and retrieving event themes. Includes scenarios with valid data, invalid data, and pagination to ensure robust API behavior. Adds necessary fixtures to support the new test cases.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# tests/conftest.py
|
||||
import uuid
|
||||
from datetime import datetime, timezone
|
||||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -326,3 +327,23 @@ def gift_category_fixture(db_session, mock_user, event_fixture):
|
||||
db_session.add(gift_category)
|
||||
db_session.commit()
|
||||
return gift_category
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def theme_data() -> Dict:
|
||||
return {
|
||||
"name": "Animal Safari",
|
||||
"description": "A wild and fun theme with safari animals",
|
||||
"preview_image_url": "https://example.com/safari.jpg",
|
||||
"color_palette": {
|
||||
"primary": "#f4a261",
|
||||
"secondary": "#2a9d8f",
|
||||
"background": "#ffffff",
|
||||
"text": "#264653"
|
||||
},
|
||||
"fonts": {
|
||||
"header": "Safari Display",
|
||||
"body": "Nunito Sans"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user