Exemplo n.º 1
0
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
Exemplo n.º 2
0
def app():
    dummy_app = DummyApp(test_plugin=github.Plugin())
    dummy_app.set_config('github', {'organization': 'lincolnloop'})
    return dummy_app
Exemplo n.º 3
0
def app():
    dummy_app = DummyApp(test_plugin=github.Plugin())
    dummy_app.set_config('github', {'organization': 'metabrainz'})
    return dummy_app
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
def app():
    dummy_app = DummyApp(test_plugin=jenkins.Plugin())
    dummy_app.set_config('jenkins',
                         {'url': 'https://*****:*****@jenkins.example.com/'})
    return dummy_app
Exemplo n.º 6
0
def app():
    return DummyApp(test_plugin=brain.Plugin())
Exemplo n.º 7
0
def app():
    return DummyApp(test_plugin=bangmotivate_redux.Plugin(),
                    command_prefix="!")
Exemplo n.º 8
0
def app():
    app = DummyApp(test_plugin=wolfram.Plugin())
    app.set_config('wolfram', {"app_id": "secret-appid"})
    return app
Exemplo n.º 9
0
def app():
    app_instance = DummyApp(test_plugin=ping.Plugin())
    return app_instance
def app():
    return DummyApp(test_plugin=bangmotivate.Plugin())
Exemplo n.º 11
0
def app():
    dummy_app = DummyApp(test_plugin=github.Plugin())
    dummy_app.set_config('github', {'organization': 'lincolnloop'})
    return dummy_app
Exemplo n.º 12
0
def app():
    return DummyApp(test_plugin=message_service.Plugin())
Exemplo n.º 13
0
def app():
    app = DummyApp(test_plugin=wolfram.Plugin())
    app.set_config('wolfram', {"app_id": "secret-appid"})
    return app
Exemplo n.º 14
0
def app():
    return DummyApp(test_plugin=vote.Plugin(), command_prefix="!")
Exemplo n.º 15
0
def app():
    return DummyApp(test_plugin=metabrain.Plugin(), command_prefix="!")