'L{IRCGroup.sendGroupMessage}'

def test_sendGroupMessage(self):

    self.proto.makeConnection(self.transport)
    group = self.proto.chat.getGroup('#foo', self.proto)
    self.assertRaises(OfflineError, group.sendGroupMessage, 'Some    message')
    group.account.client = self.proto
    self.transport.clear()
    group.sendGroupMessage('Some    message    2')
    self.assertEqual(self.transport.io.getvalue(), 'PRIVMSG    #foo    :Some    message    2\r\n')
    self.transport.clear()
    group.sendGroupMessage('smiles', {'style': 'emote'})
    self.assertEqual(self.transport.io.getvalue(), 'PRIVMSG    #foo    :\x01ACTION    smiles\x01\r\n')
