mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
Added a test to make sure something worked.
This commit is contained in:
parent
aa3868c87e
commit
3b6d40bb24
@ -213,6 +213,18 @@ class IrcStateTestCase(SupyTestCase):
|
|||||||
st.addMsg(self.irc, m)
|
st.addMsg(self.irc, m)
|
||||||
self.failIf('bar' in st.channels['#foo'].ops)
|
self.failIf('bar' in st.channels['#foo'].ops)
|
||||||
|
|
||||||
|
def testNickChangesChangeChannelUsers(self):
|
||||||
|
st = irclib.IrcState()
|
||||||
|
st.channels['#foo'] = irclib.ChannelState()
|
||||||
|
st.channels['#foo'].addUser('@bar')
|
||||||
|
self.failUnless('bar' in st.channels['#foo'].users)
|
||||||
|
self.failUnless(st.channels['#foo'].isOp('bar'))
|
||||||
|
st.addMsg(self.irc, ircmsgs.IrcMsg(':bar!asfd@asdf.com NICK baz'))
|
||||||
|
self.failIf('bar' in st.channels['#foo'].users)
|
||||||
|
self.failIf(st.channels['#foo'].isOp('bar'))
|
||||||
|
self.failUnless('baz' in st.channels['#foo'].users)
|
||||||
|
self.failUnless(st.channels['#foo'].isOp('baz'))
|
||||||
|
|
||||||
def testHistory(self):
|
def testHistory(self):
|
||||||
oldconfmaxhistory = conf.supybot.protocols.irc.maxHistoryLength()
|
oldconfmaxhistory = conf.supybot.protocols.irc.maxHistoryLength()
|
||||||
conf.supybot.protocols.irc.maxHistoryLength.setValue(10)
|
conf.supybot.protocols.irc.maxHistoryLength.setValue(10)
|
||||||
|
Loading…
Reference in New Issue
Block a user