'L{IRCClient.register} sends NICK and USER commands with the
username, name, hostname, server name, and real name specified.'

def test_register(self):

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