예제 #1
0
 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
예제 #2
0
 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)
예제 #3
0
 def testGetMsgClient(self):
     for msg_type in MSG_CLIENTS.keys():
         self.ch.set('msg_type', msg_type)
         getMsgClient(self.ch)