def app(): dummy_app = DummyApp(test_plugin=jira.Plugin()) dummy_app.set_config( 'jira', { 'jira_url': 'https://tickets.test.org', 'bot_name': 'testbot', 'issue_cooldown': 2 }) return dummy_app
def app(): dummy_app = DummyApp(test_plugin=github.Plugin()) dummy_app.set_config('github', {'organization': 'lincolnloop'}) return dummy_app
def app(): dummy_app = DummyApp(test_plugin=github.Plugin()) dummy_app.set_config('github', {'organization': 'metabrainz'}) return dummy_app
from botbot_plugins.base import BasePlugin, DummyApp bp = BasePlugin() bp.app = DummyApp() def test_retrieve_nonexistent_key(): "test retrieve operation on nonexistent key" assert (bp.retrieve('nobody_home') is None) def test_store_and_retrieve(): "test storing and retrieving a string value" first_rule = """\ A robot may not injure a human being or, through inaction, allow a human being to come to harm.""" bp.store('first_rule', first_rule) assert (bp.retrieve('first_rule') == first_rule) def test_incr(): "test that counters can be created and incremented" #key doesn't exist yet assert (bp.incr('counter') == 1) #incr key with current value of 1 assert (bp.incr('counter') == 2)
def app(): dummy_app = DummyApp(test_plugin=jenkins.Plugin()) dummy_app.set_config('jenkins', {'url': 'https://*****:*****@jenkins.example.com/'}) return dummy_app
def app(): return DummyApp(test_plugin=brain.Plugin())
def app(): return DummyApp(test_plugin=bangmotivate_redux.Plugin(), command_prefix="!")
def app(): app = DummyApp(test_plugin=wolfram.Plugin()) app.set_config('wolfram', {"app_id": "secret-appid"}) return app
def app(): app_instance = DummyApp(test_plugin=ping.Plugin()) return app_instance
def app(): return DummyApp(test_plugin=bangmotivate.Plugin())
def app(): return DummyApp(test_plugin=message_service.Plugin())
def app(): return DummyApp(test_plugin=vote.Plugin(), command_prefix="!")
def app(): return DummyApp(test_plugin=metabrain.Plugin(), command_prefix="!")