Skip to content

Instantly share code, notes, and snippets.

@zoni
Last active December 10, 2015 13:58
Show Gist options
  • Save zoni/4443860 to your computer and use it in GitHub Desktop.
Save zoni/4443860 to your computer and use it in GitHub Desktop.
err-skeleton unittests attempt
from errbot.backends.test import *
from os.path import dirname, abspath
pluginpath = dirname(abspath(__file__)) + "/../"
class TestCommands(FullStackTest):
def setUp(self):
from errbot import holder
holder.plugin_manager.updatePluginPlaces([pluginpath])
holder.plugin_manager.collectPlugins()
for pluginInfo in holder.plugin_manager.getAllPlugins():
holder.plugin_manager.activatePluginByName(pluginInfo.name)
super(TestCommands, self).setUp()
def test_example_command(self):
pushMessage('!example')
self.assertEqual('Example', popMessage())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment