1
0
Fork 0
mirror of synced 2024-06-15 13:51:08 -04:00
dotbot/tests/dotbot_plugin_dispatch.py

18 lines
405 B
Python
Raw Normal View History

"""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)