def testSendImplemented(self): for msg_type in MSG_CLIENTS.keys(): self.ch.set('msg_type', msg_type) client = getMsgClient(self.ch) try: client.send("message") except NotImplementedError: self.fail("send() should be implemented on '%s'." % msg_type) except Exception: pass
def __init__(self, message, configHolder): if not isinstance(message, basestring): raise InputException("Message should be 'str' or 'unicode'.") self.message = message self.client = getMsgClient(configHolder)
def testGetMsgClient(self): for msg_type in MSG_CLIENTS.keys(): self.ch.set('msg_type', msg_type) getMsgClient(self.ch)