Exemple #1
0
def setup(bot):
    """Set up the config section & memory."""
    bot.config.define_section('status', StatusSection)
    bot.memory['status'] = SopelMemory()
    bot.memory['status']['jdcache'] = jp.createdict(
        bot.settings.status.datafile)
    bot.memory['status']['session'] = Session()
Exemple #2
0
def setup(bot):
    """Create the config section & memory."""
    bot.config.define_section('phabricator', PhabricatorSection)
    bot.memory['phab'] = SopelMemory()
    bot.memory['phab']['jdcache'] = jp.createdict(
        bot.settings.phabricator.datafile)
    bot.memory['phab']['session'] = Session()
Exemple #3
0
def setup(instance: bot) -> None:
    """Create the config section & memory."""
    instance.config.define_section('phabricator', PhabricatorSection)
    instance.memory['phab'] = SopelMemory()
    instance.memory['phab']['jdcache'] = jp.createdict(instance.settings.phabricator.datafile)
Exemple #4
0
def reset_phab_cache(instance: bot, message: trigger) -> None:  # noqa: U100
    """Reset the cache of the channel management data file."""
    instance.reply('Refreshing Cache...')
    instance.memory['phab']['jdcache'] = jp.createdict(instance.settings.phabricator.datafile)
    instance.reply('Cache refreshed')
Exemple #5
0
def reset_status_cache(bot, trigger):  # noqa: U100
    """Reset the cache of the channel management data file."""
    bot.reply('Refreshing Cache...')
    bot.memory['status']['jdcache'] = jp.createdict(
        bot.settings.status.datafile)
    bot.reply('Cache refreshed')
Exemple #6
0
def test_create_dict():
    assert DICT == jp.createdict('jsontests/test_json.json')