18 lines
462 B
Python
18 lines
462 B
Python
"""ID 生成测试。"""
|
|
|
|
from app.core.ids import (
|
|
new_character_id,
|
|
new_event_id,
|
|
new_personality_proposal_id,
|
|
new_run_id,
|
|
new_user_id,
|
|
)
|
|
|
|
|
|
def test_id_prefixes() -> None:
|
|
assert new_character_id().startswith("character_")
|
|
assert new_run_id().startswith("run_")
|
|
assert new_event_id().startswith("event_")
|
|
assert new_personality_proposal_id().startswith("personality_proposal_")
|
|
assert new_user_id().startswith("user_")
|