fix processing of multiline CAP LS 302 output (#153)

connectClient implicitly assumed that the CAP LS 302 output would be
a single registration message. This caused incorrect skipping of some tests
with `skip_if_cap_nak=True`, for example
RegisterEmailVerifiedTestCase.testAfterConnect on Ergo.

Technically there is no need for connectClient to send CAP LS before CAP REQ;
however, this provides additional test coverage for the syntactic correctness
of the CAP LS output in multiple server configurations, so we might as well
keep it.
This commit is contained in:
Shivaram Lingamneni 2022-04-10 02:39:30 -04:00 committed by GitHub
parent ebd7edcc74
commit 3083aeeb24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -672,7 +672,7 @@ class BaseServerTestCase(
client = self.addClient(name, show_io=show_io) client = self.addClient(name, show_io=show_io)
if capabilities: if capabilities:
self.sendLine(client, "CAP LS 302") self.sendLine(client, "CAP LS 302")
m = self.getRegistrationMessage(client) self.getCapLs(client)
self.requestCapabilities(client, capabilities, skip_if_cap_nak) self.requestCapabilities(client, capabilities, skip_if_cap_nak)
if password is not None: if password is not None:
if "sasl" not in (capabilities or ()): if "sasl" not in (capabilities or ()):