Spaces:
Sleeping
Sleeping
| from backend.app.core.prompting import compile_prompts | |
| def test_compile_prompts_applies_type_and_style() -> None: | |
| result = compile_prompts( | |
| prompt="a dragon over city", | |
| negative_prompt="", | |
| image_type="poster", | |
| style_preset="cinematic", | |
| style_strength=80, | |
| ) | |
| assert "Target:" in result.prompt | |
| assert "style influence 80%" in result.prompt | |
| assert "watermark" in result.negative_prompt | |
| def test_compile_prompts_merges_negative_prompt() -> None: | |
| result = compile_prompts( | |
| prompt="logo for bakery", | |
| negative_prompt="busy background", | |
| image_type="logo", | |
| style_preset="minimal", | |
| style_strength=50, | |
| ) | |
| assert result.negative_prompt.startswith("busy background") | |