diff --git a/src/ircmsgs.py b/src/ircmsgs.py index 2c26f5dd5..999bd6589 100644 --- a/src/ircmsgs.py +++ b/src/ircmsgs.py @@ -80,7 +80,7 @@ class IrcMsg(object): """ __slots__ = ('args', 'command', 'host', 'nick', 'prefix', 'user', '_hash', '_str', '_repr', '_len') - def __init__(self, s='', command='', args=None, prefix='', msg=None): + def __init__(self, s='', command='', args=(), prefix='', msg=None): assert not (msg and s), 'Ircmsg.__init__ cannot accept both s and msg' if not s and not command and not msg: raise MalformedIrcMsg, 'IRC messages require a command.' diff --git a/test/test_ircmsgs.py b/test/test_ircmsgs.py index 9796c2fdd..be5059894 100644 --- a/test/test_ircmsgs.py +++ b/test/test_ircmsgs.py @@ -180,5 +180,8 @@ class FunctionsTestCase(unittest.TestCase): self.assertEqual(ircmsgs.joins(channels, keys).args, ('#osu,#umich', 'michiganSucks')) + def testQuit(self): + self.failUnless(ircmsgs.quit(prefix='foo!bar@baz')) + # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: