mirror of https://github.com/progval/irctest.git
add a test for PART messages
This commit is contained in:
parent
18d123357f
commit
1d0c8687ee
|
@ -137,6 +137,30 @@ class JoinTestCase(cases.BaseServerTestCase):
|
||||||
'"foo" with an optional "+" or "@" prefix, but got: '
|
'"foo" with an optional "+" or "@" prefix, but got: '
|
||||||
'{msg}')
|
'{msg}')
|
||||||
|
|
||||||
|
@cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812')
|
||||||
|
def testNormalPart(self):
|
||||||
|
self.connectClient('bar')
|
||||||
|
self.sendLine(1, 'JOIN #chan')
|
||||||
|
m = self.getMessage(1)
|
||||||
|
self.assertMessageEqual(m, command='JOIN', params=['#chan'])
|
||||||
|
|
||||||
|
self.connectClient('baz')
|
||||||
|
self.sendLine(2, 'JOIN #chan')
|
||||||
|
m = self.getMessage(2)
|
||||||
|
self.assertMessageEqual(m, command='JOIN', params=['#chan'])
|
||||||
|
|
||||||
|
# skip the rest of the JOIN burst:
|
||||||
|
self.getMessages(1)
|
||||||
|
self.getMessages(2)
|
||||||
|
|
||||||
|
self.sendLine(1, 'PART #chan :bye everyone')
|
||||||
|
# both the PART'ing client and the other channel member should receive a PART line:
|
||||||
|
m = self.getMessage(1)
|
||||||
|
self.assertMessageEqual(m, command='PART', params=['#chan', 'bye everyone'])
|
||||||
|
m = self.getMessage(2)
|
||||||
|
self.assertMessageEqual(m, command='PART', params=['#chan', 'bye everyone'])
|
||||||
|
|
||||||
|
|
||||||
@cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812')
|
@cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812')
|
||||||
def testTopic(self):
|
def testTopic(self):
|
||||||
"""“Once a user has joined a channel, he receives information about
|
"""“Once a user has joined a channel, he receives information about
|
||||||
|
|
Loading…
Reference in New Issue