def test_channel_message(self, mock_msg): firefly_irc = FireflyIRC(Server(self.hostname, self.config)) dest = containers.Destination(firefly_irc, '#testchan') firefly_irc.msg(dest, 'Hello, world!') mock_msg.assert_called_once_with(firefly_irc, '#testchan', 'Hello, world!', None)
def test_user_message(self, mock_msg): firefly_irc = FireflyIRC(Server(self.hostname, self.config)) host = containers.Hostmask('[email protected]') firefly_irc.msg(host, 'Hello, world!') mock_msg.assert_called_once_with(firefly_irc, 'test_nick', 'Hello, world!', None)