Move character slot label policy
This commit is contained in:
@@ -682,6 +682,25 @@ def smoke_category_cast_config_policy() -> None:
|
||||
== ("two women", "two women", "close affectionate couple pose", 2, 0),
|
||||
"Couple type count override for two women changed",
|
||||
)
|
||||
label_slots = [
|
||||
{"subject_type": "woman", "label": "auto_chain", "name": "older auto"},
|
||||
{"subject_type": "woman", "label": "auto_chain", "name": "newer auto"},
|
||||
{"subject_type": "man", "label": "B", "name": "explicit man"},
|
||||
]
|
||||
label_map = cast_context.character_slot_label_map(label_slots)
|
||||
_expect(
|
||||
label_map.get("Woman A", {}).get("name") == "newer auto"
|
||||
and label_map.get("Woman B", {}).get("name") == "older auto",
|
||||
"Character slot auto-chain label order changed",
|
||||
)
|
||||
_expect(
|
||||
label_map.get("Man B", {}).get("name") == "explicit man",
|
||||
"Character slot explicit label mapping changed",
|
||||
)
|
||||
_expect(
|
||||
pb._character_slot_label_map(label_slots) == label_map,
|
||||
"Prompt builder character slot label map should delegate to cast_context",
|
||||
)
|
||||
|
||||
category_config = json.loads(pb.build_category_config_json("hardcore_pose", "Foreplay and teasing"))
|
||||
_expect(category_config.get("category") == "Hardcore sexual poses", "Category config lost hardcore category mapping")
|
||||
|
||||
Reference in New Issue
Block a user