| 48 | |
| 49 | @pytest.mark.asyncio |
| 50 | async def test_generator_run_delegates_to_skill_creator(tmp_path): |
| 51 | kb = _make_kb(tmp_path) |
| 52 | g = Generator( |
| 53 | target_type="skill", |
| 54 | name="demo", |
| 55 | intent="x", |
| 56 | kb_dir=kb, |
| 57 | model="gpt-4o-mini", |
| 58 | ) |
| 59 | with ( |
| 60 | patch("openkb.skill.generator.run_skill_create", new=AsyncMock()) as runner, |
| 61 | patch("openkb.skill.generator.regenerate_marketplace") as regen, |
| 62 | ): |
| 63 | await g.run() |
| 64 | runner.assert_awaited_once() |
| 65 | regen.assert_called_once_with(kb) |
| 66 | |
| 67 | |
| 68 | # --- target_type="deck" dispatch ------------------------------------------- |