mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 07:34:08 +01:00
Make sure strictRfc is on before testing for assertions.
This commit is contained in:
parent
6c22927055
commit
995ba6f229
@ -32,6 +32,7 @@ from supybot.test import *
|
|||||||
import copy
|
import copy
|
||||||
import pickle
|
import pickle
|
||||||
|
|
||||||
|
import supybot.conf as conf
|
||||||
import supybot.ircmsgs as ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
@ -168,10 +169,11 @@ class FunctionsTestCase(SupyTestCase):
|
|||||||
'PRIVMSG foo,bar :baz\r\n')
|
'PRIVMSG foo,bar :baz\r\n')
|
||||||
|
|
||||||
def testWhois(self):
|
def testWhois(self):
|
||||||
self.assertEqual(str(ircmsgs.whois('foo')), 'WHOIS :foo\r\n')
|
with conf.supybot.protocols.irc.strictRfc.context(True):
|
||||||
self.assertEqual(str(ircmsgs.whois('foo,bar')), 'WHOIS :foo,bar\r\n')
|
self.assertEqual(str(ircmsgs.whois('foo')), 'WHOIS :foo\r\n')
|
||||||
self.assertRaises(AssertionError, ircmsgs.whois, '#foo')
|
self.assertEqual(str(ircmsgs.whois('foo,bar')), 'WHOIS :foo,bar\r\n')
|
||||||
self.assertRaises(AssertionError, ircmsgs.whois, 'foo,#foo')
|
self.assertRaises(AssertionError, ircmsgs.whois, '#foo')
|
||||||
|
self.assertRaises(AssertionError, ircmsgs.whois, 'foo,#foo')
|
||||||
|
|
||||||
def testBan(self):
|
def testBan(self):
|
||||||
channel = '#osu'
|
channel = '#osu'
|
||||||
|
Loading…
Reference in New Issue
Block a user