mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
ChannelStats: Fix tests.
This commit is contained in:
parent
4c23fae4d3
commit
a11cb6478a
@ -44,21 +44,23 @@ class ChannelStatsTestCase(ChannelPluginTestCase):
|
||||
_ = self.irc.takeMsg()
|
||||
chanop = ircdb.makeChannelCapability(self.channel, 'op')
|
||||
ircdb.users.getUser(self.nick).addCapability(chanop)
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
|
||||
def test(self):
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self.assertNotError('channelstats')
|
||||
self.assertNotError('channelstats')
|
||||
self.assertNotError('channelstats')
|
||||
|
||||
def testStats(self):
|
||||
self.assertError('channelstats stats %s' % self.nick)
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self.assertNotError('channelstats stats %s' % self.nick)
|
||||
self.assertNotError('channelstats stats %s' % self.nick.upper())
|
||||
self.assertNotError('channelstats stats')
|
||||
self.assertRegexp('channelstats stats', self.nick)
|
||||
|
||||
def testSelfStats(self):
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self.assertError('channelstats stats %s' % self.irc.nick)
|
||||
self.assertNotError('channelstats stats %s' % self.irc.nick)
|
||||
self.assertNotError('channelstats stats %s' % self.irc.nick)
|
||||
@ -76,9 +78,11 @@ class ChannelStatsTestCase(ChannelPluginTestCase):
|
||||
conf.supybot.plugins.ChannelStats.selfStats.setValue(True)
|
||||
|
||||
def testNoKeyErrorStats(self):
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self.assertNotRegexp('stats sweede', 'KeyError')
|
||||
|
||||
def testRank(self):
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self.assertError('channelstats stats %s' % self.irc.nick)
|
||||
self.assertNotError('channelstats stats %s' % self.irc.nick)
|
||||
self.assertNotError('channelstats stats %s' % self.irc.nick)
|
||||
|
Loading…
Reference in New Issue
Block a user