'Lines received in I{RPL_MOTDSTART} and I{RPL_MOTD} are delivered to
L{IRCClient.receivedMOTD} when I{RPL_ENDOFMOTD} is received.'

def test_receivedMOTD(self):

    lines = [':host.name    375    nickname    :-    host.name    Message    of    the    Day    -', ':host.name    372    nickname    :-    Welcome    to    host.name', ':host.name    376    nickname    :End    of    /MOTD    command.']
    for L in lines:
        self.assertEqual(self.client.calls, [])
        self.client.dataReceived((L + '\r\n'))
    self.assertEqual(self.client.calls, [('receivedMOTD', {'motd': ['host.name    Message    of    the    Day    -', 'Welcome    to    host.name']})])
    self.assertIdentical(self.client.motd, None)
