mirror of
https://github.com/progval/irctest.git
synced 2025-04-05 06:49:47 +00:00
testCapRemovalByClient: Support multiple CAP LS responses (#220)
This commit is contained in:
@ -347,8 +347,13 @@ class CapTestCase(cases.BaseServerTestCase):
|
|||||||
self.addClient(1)
|
self.addClient(1)
|
||||||
self.connectClient("sender")
|
self.connectClient("sender")
|
||||||
self.sendLine(1, "CAP LS 302")
|
self.sendLine(1, "CAP LS 302")
|
||||||
|
caps = set()
|
||||||
|
while True:
|
||||||
m = self.getRegistrationMessage(1)
|
m = self.getRegistrationMessage(1)
|
||||||
if not ({cap1, cap2} <= set(m.params[2].split())):
|
caps.update(m.params[-1].split())
|
||||||
|
if m.params[2] != "*":
|
||||||
|
break
|
||||||
|
if not ({cap1, cap2} <= caps):
|
||||||
raise CapabilityNotSupported(f"{cap1} or {cap2}")
|
raise CapabilityNotSupported(f"{cap1} or {cap2}")
|
||||||
self.sendLine(1, f"CAP REQ :{cap1} {cap2}")
|
self.sendLine(1, f"CAP REQ :{cap1} {cap2}")
|
||||||
self.sendLine(1, "nick bar")
|
self.sendLine(1, "nick bar")
|
||||||
|
Reference in New Issue
Block a user