Don't send empty CAP REQ

This commit is contained in:
Daniel Oaks
2017-11-01 23:33:43 +00:00
parent 37ea5be753
commit 39a90e5726
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, def connectClient(self, nick, name=None, capabilities=None,
skip_if_cap_nak=False): skip_if_cap_nak=False):
client = self.addClient(name) 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))) self.sendLine(client, 'CAP REQ :{}'.format(' '.join(capabilities)))
m = self.getRegistrationMessage(client) m = self.getRegistrationMessage(client)
try: try:

View File

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