forked from Rockachopa/Timmy-time-dashboard
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
from timmy.prompts import SYSTEM_PROMPT, STATUS_PROMPT, get_system_prompt
|
|
|
|
|
|
def test_system_prompt_not_empty():
|
|
assert SYSTEM_PROMPT.strip()
|
|
|
|
|
|
def test_system_prompt_no_persona_identity():
|
|
"""System prompt should NOT contain persona identity references."""
|
|
prompt = SYSTEM_PROMPT.lower()
|
|
assert "sovereign" not in prompt
|
|
assert "sir, affirmative" not in prompt
|
|
assert "christian" not in prompt
|
|
assert "bitcoin" not in prompt
|
|
|
|
|
|
def test_system_prompt_references_local():
|
|
assert "local" in SYSTEM_PROMPT.lower()
|
|
|
|
|
|
def test_system_prompt_is_multiline():
|
|
assert "\n" in SYSTEM_PROMPT
|
|
|
|
|
|
def test_status_prompt_not_empty():
|
|
assert STATUS_PROMPT.strip()
|
|
|
|
|
|
def test_status_prompt_no_persona():
|
|
"""Status prompt should not reference a persona."""
|
|
assert "Timmy" not in STATUS_PROMPT
|
|
|
|
|
|
def test_prompts_are_distinct():
|
|
assert SYSTEM_PROMPT != STATUS_PROMPT
|
|
|
|
|
|
def test_get_system_prompt_injects_model_name():
|
|
"""System prompt should inject actual model name from config."""
|
|
prompt = get_system_prompt(tools_enabled=False)
|
|
# Should contain the model name from settings, not the placeholder
|
|
assert "{model_name}" not in prompt
|
|
assert "llama3.1" in prompt or "qwen" in prompt
|