Don't send empty CAP REQ

This commit is contained in:
Daniel Oaks
2017-11-01 23:33:43 +00:00
committed by Valentin Lorentz
parent 711de43b22
commit 3d0b493a11
2 changed files with 2 additions and 2 deletions

View File

@ -331,7 +331,7 @@ class BaseServerTestCase(_IrcTestCase):
def connectClient(self, nick, name=None, capabilities=None,
skip_if_cap_nak=False):
client = self.addClient(name)
if capabilities is not None:
if capabilities is not None and 0 < len(capabilities):
self.sendLine(client, 'CAP REQ :{}'.format(' '.join(capabilities)))
m = self.getRegistrationMessage(client)
try:

View File

@ -38,7 +38,7 @@ class EchoMessageTestCase(cases.BaseServerTestCase):
self.sendLine(1, 'JOIN #chan')
if not solo:
capabilities = ['server-time'] if server_time else []
capabilities = ['server-time'] if server_time else None
self.connectClient('qux', capabilities=capabilities)
self.sendLine(2, 'JOIN #chan')