Ticket #2086: basesupport.patch

File basesupport.patch, 1.3 KB (added by Cory Dodt, 16 years ago)
  • twisted/words/test/test_irc.py

     
    370370        self.assertRaises(ValueError, irc.split, 'foo', 0)
    371371        self.assertEquals([], irc.split('', 1))
    372372        self.assertEquals([], irc.split(''))
     373
     374from twisted.words.im import ircsupport
     375from twisted.internet import error
     376
     377
     378class ClientMsgTests(unittest.TestCase):
     379    def setUp(self):
     380        self.chatui = object()
     381
     382    def test_alreadyConnecting(self):
     383        account = ircsupport.IRCAccount('la', False, 'la', None, 'localhost', 6667)
     384        account._isConnecting = 1
     385        self.assertRaises(error.ConnectError, account.logOn, self.chatui)
  • twisted/words/im/basesupport.py

     
    203203            d.addCallback(chatui.registerAccountClient)
    204204            return d
    205205        else:
    206             raise error.ConnectionError("Connection in progress")
     206            raise error.ConnectError("Connection in progress")
    207207
    208208    def getGroup(self, name):
    209209        """Group factory.