1
0
Fork 0
mirror of synced 2024-11-16 05:35:33 -05:00
dotbot/tests/dotbot_plugin_dispatch.py
Wouter Franken e2c455213c Add plugin dispatch test
Add test to verify that a plugin can run dispatch to handle subtasks of
external plugins.
2023-02-19 13:09:00 +01:00

17 lines
405 B
Python

"""Test that a plugin can call dispatcher for subtasks.
The plugin calls dispatch with his data.
"""
import os.path
import dotbot
class Dispatch(dotbot.Plugin):
def can_handle(self, directive):
return directive == "dispatch"
def handle(self, directive, data):
dispatcher = dotbot.dispatcher.Dispatcher(self._context.base_directory())
return dispatcher.dispatch(data)