'If the C{password} attribute of L{IRCClient} is not L{None}, the
C{register} method also sends a PASS command with it as the
argument.'

def test_registerWithPassword(self):

    username = 'testuser'
    hostname = 'testhost'
    servername = 'testserver'
    self.protocol.realname = 'testname'
    self.protocol.password = 'testpass'
    self.protocol.register(username, hostname, servername)
    expected = [('PASS    %s' % (self.protocol.password,)), ('NICK    %s' % (username,)), ('USER    %s    %s    %s    :%s' % (username, hostname, servername, self.protocol.realname)), '']
    self.assertEqualBufferValue(self.transport.value().split('\r\n'), expected)
