ppt-tool/backend/tests/test_pptx_creator.py
Vadym Samoilenko 1293826226 Rebrand Presenton to Oliver DeckForge, pre-configure models, use NanoBanana Pro
- Replace all Presenton branding with Oliver DeckForge (metadata, headers, titles, logos)
- Pass CAN_CHANGE_KEYS=false to web container so setup page redirects to /upload
- Switch image provider from gemini_flash to nanobanana_pro
- Update default fallback paths from /tmp/presenton to /tmp/deckforge
- Rename packages: presenton → oliver-deckforge, presenton-backend → oliver-deckforge-backend
- Remove external presenton.ai URLs from metadata (canonical, OG, Twitter)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:17:11 +00:00

40 lines
1.1 KiB
Python

import asyncio
from models.pptx_models import (
PptxAutoShapeBoxModel,
PptxFillModel,
PptxPositionModel,
PptxPresentationModel,
PptxSlideModel,
)
from services.pptx_presentation_creator import PptxPresentationCreator
from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE
pptx_model = PptxPresentationModel(
slides=[
PptxSlideModel(
shapes=[
PptxAutoShapeBoxModel(
type=MSO_AUTO_SHAPE_TYPE.RECTANGLE,
position=PptxPositionModel(
left=20,
right=20,
width=100,
height=100,
),
fill=PptxFillModel(
color="000000",
opacity=0.5,
),
)
]
)
]
)
def test_pptx_creator():
temp_dir = "/tmp/deckforge"
pptx_creator = PptxPresentationCreator(pptx_model, temp_dir)
asyncio.run(pptx_creator.create_ppt())
pptx_creator.save("debug/test.pptx")