Exemple #1
0
 def test_whisper(self, mock_globals):
     connection_ = Mock(spec=connection.ConnectionHandler)
     connection_.messaging = Mock(spec=MessagingQueue)
     mock_globals.cluster = connection_
     utils.whisper('botgotsthis', 'Kappa')
     connection_.messaging.sendWhisper.assert_called_once_with(
         'botgotsthis', 'Kappa')
Exemple #2
0
 def test_clearAllChat(self, mock_globals):
     connection_ = Mock(spec=connection.ConnectionHandler)
     connection_.messaging = Mock(spec=MessagingQueue)
     mock_globals.cluster = connection_
     utils.clearAllChat()
     connection_.messaging.clearAllChat.assert_called_once_with()