def test_load_spell(self, __init__): tohsaka = Tohsaka('rest', {}) tohsaka.config = { 'spell': { 'type': 'rest', 'options': { 'endpoint': '' } } } tohsaka.spell = tohsaka._load_module('Spell', 'rest', tohsaka.SPELL_PATH, {}) assert hasattr(tohsaka, 'spell') assert callable(tohsaka.spell.go)
def test_load_outputter(self, __init__, outputter_type): tohsaka = Tohsaka('test', {}) tohsaka.config = { 'outputter': { 'type': outputter_type, 'options': { 'endpoint': '' } } } tohsaka.outputter = tohsaka._load_module('Outputter', 'test', tohsaka.OUTPUTTER_PATH, {}) assert hasattr(tohsaka, 'outputter') assert callable(tohsaka.outputter.go)