view jabberbot/_tests/ @ 3748:dc917a577d38

add multiconfig.DefaultExpression for documentation this allows showing the actual expression used as the default rather than using '%r', use sparingly
author Johannes Berg <johannes AT sipsolutions DOT net>
date Sun, 22 Jun 2008 00:36:25 +0200
parents 558a527c0ec7
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - XMLRPC bot tests

    @copyright: 2007 by Karol Nowak <>
    @license: GNU GPL, see COPYING for details.

import py
from Queue import Queue

    import pyxmpp
except ImportError:
    py.test.skip("Skipping jabber bot tests - pyxmpp is not installed")

import jabberbot.xmlrpcbot as xmlrpcbot
from jabberbot.config import BotConfig

class TestXMLRPCBotAPIs:
    def setup_class(self):
        self.queue_in = Queue()
        self.queue_out = Queue() = xmlrpcbot.XMLRPCClient(BotConfig, self.queue_in, self.queue_out)

    def testReportError(self):
        print "report_error() should put a command in the output queue"[""], "Error %(err)s!", data={'err': 'bar!'})

    def testWanrNoCredentials(self):
        print "warn_no_credentials() should put a command in the output queue"[""])