mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-25 19:44:13 +01:00
ChannelStats: Fix tests.
This commit is contained in:
parent
4c23fae4d3
commit
a11cb6478a
@ -44,21 +44,23 @@ class ChannelStatsTestCase(ChannelPluginTestCase):
|
|||||||
_ = self.irc.takeMsg()
|
_ = self.irc.takeMsg()
|
||||||
chanop = ircdb.makeChannelCapability(self.channel, 'op')
|
chanop = ircdb.makeChannelCapability(self.channel, 'op')
|
||||||
ircdb.users.getUser(self.nick).addCapability(chanop)
|
ircdb.users.getUser(self.nick).addCapability(chanop)
|
||||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
|
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||||
self.assertNotError('channelstats')
|
self.assertNotError('channelstats')
|
||||||
self.assertNotError('channelstats')
|
self.assertNotError('channelstats')
|
||||||
self.assertNotError('channelstats')
|
self.assertNotError('channelstats')
|
||||||
|
|
||||||
def testStats(self):
|
def testStats(self):
|
||||||
self.assertError('channelstats stats %s' % self.nick)
|
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)
|
||||||
self.assertNotError('channelstats stats %s' % self.nick.upper())
|
self.assertNotError('channelstats stats %s' % self.nick.upper())
|
||||||
self.assertNotError('channelstats stats')
|
self.assertNotError('channelstats stats')
|
||||||
self.assertRegexp('channelstats stats', self.nick)
|
self.assertRegexp('channelstats stats', self.nick)
|
||||||
|
|
||||||
def testSelfStats(self):
|
def testSelfStats(self):
|
||||||
|
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||||
self.assertError('channelstats stats %s' % self.irc.nick)
|
self.assertError('channelstats stats %s' % self.irc.nick)
|
||||||
self.assertNotError('channelstats stats %s' % self.irc.nick)
|
self.assertNotError('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)
|
conf.supybot.plugins.ChannelStats.selfStats.setValue(True)
|
||||||
|
|
||||||
def testNoKeyErrorStats(self):
|
def testNoKeyErrorStats(self):
|
||||||
|
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||||
self.assertNotRegexp('stats sweede', 'KeyError')
|
self.assertNotRegexp('stats sweede', 'KeyError')
|
||||||
|
|
||||||
def testRank(self):
|
def testRank(self):
|
||||||
|
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||||
self.assertError('channelstats stats %s' % self.irc.nick)
|
self.assertError('channelstats stats %s' % self.irc.nick)
|
||||||
self.assertNotError('channelstats stats %s' % self.irc.nick)
|
self.assertNotError('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