Skip to content

Commit

Permalink
testCapRemovalByClient: Support multiple CAP LS responses (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
progval authored Sep 2, 2023
1 parent 1c6a718 commit 34c78e5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions irctest/server_tests/cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 34c78e5

Please sign in to comment.