From 34c78e5d2f739d10c616d28738c91836de598505 Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Sat, 2 Sep 2023 15:42:18 +0200 Subject: [PATCH] testCapRemovalByClient: Support multiple CAP LS responses (#220) --- irctest/server_tests/cap.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/irctest/server_tests/cap.py b/irctest/server_tests/cap.py index b6b0d5e8..fea4ef00 100644 --- a/irctest/server_tests/cap.py +++ b/irctest/server_tests/cap.py @@ -347,8 +347,13 @@ def testCapRemovalByClient(self): self.addClient(1) self.connectClient("sender") self.sendLine(1, "CAP LS 302") - m = self.getRegistrationMessage(1) - if not ({cap1, cap2} <= set(m.params[2].split())): + caps = set() + while True: + m = self.getRegistrationMessage(1) + caps.update(m.params[-1].split()) + if m.params[2] != "*": + break + if not ({cap1, cap2} <= caps): raise CapabilityNotSupported(f"{cap1} or {cap2}") self.sendLine(1, f"CAP REQ :{cap1} {cap2}") self.sendLine(1, "nick bar")