'The fallback handler is invoked for unrecognized CTCP messages.'

def test_noDefaultDispatch(self):

    def unknownQuery(user, channel, tag, data):
        self.calledWith = (user, channel, tag, data)
        self.called += 1
    self.called = 0
    self.patch(self.client, 'ctcpUnknownQuery', unknownQuery)
    self.client.irc_PRIVMSG('foo!bar@baz.quux', ['#chan', ('%(X)sNOTREAL%(X)s' % {'X': irc.X_DELIM})])
    self.assertEqualBufferValue(self.file.getvalue(), '')
    self.assertEqual(self.calledWith, ('foo!bar@baz.quux', '#chan', 'NOTREAL', None))
    self.assertEqual(self.called, 1)
    self.client.irc_PRIVMSG('foo!bar@baz.quux', ['#chan', ('%(X)sNOTREAL%(X)sfoo%(X)sNOTREAL%(X)s' % {'X': irc.X_DELIM})])
    self.assertEqual(self.called, 2)
