'Passing a command and parameters with a specified prefix and tags
to L{IRC.sendCommand} results in a proper query string including the
specified line prefix and appropriate tags syntax.  The query string
should be output as follows:
@tags :prefix COMMAND param1 param2
The tags are a string of IRCv3 tags, preceded by \'@\'.  The rest
of the string is as described in test_sendMessage.  For more on
the message tag format, see U{the IRCv3 specification
<https://ircv3.net/specs/core/message-tags-3.2.html>}.'

def test_sendCommandWithTags(self):

    sendTags = {u'aaa': u'bbb', u'ccc': None, u'example.com/ddd': u'eee'}
    expectedTags = ('aaa=bbb', 'ccc', 'example.com/ddd=eee')
    self.p.sendCommand(u'CMD', (u'param1', u'param2'), u'irc.example.com', sendTags)
    outMsg = self.f.getvalue()
    (outTagStr, outLine) = outMsg.split('    ', 1)
    outTags = outTagStr[1:].split(';')
    self.assertEqual(outLine, ':irc.example.com    CMD    param1    param2\r\n')
    self.assertEqual(sorted(expectedTags), sorted(outTags))
