From 375789218a26f3723e6d9e85bdb96fb408a8094b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 4 Nov 2003 06:39:20 +0000 Subject: [PATCH] Fixed bug in test suite. --- test/test_ChannelDB.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test_ChannelDB.py b/test/test_ChannelDB.py index 7e773da65..72032a61c 100644 --- a/test/test_ChannelDB.py +++ b/test/test_ChannelDB.py @@ -31,6 +31,8 @@ from test import * +import ircdb + try: import sqlite except ImportError: @@ -64,8 +66,12 @@ if sqlite is not None: self.assertError('channeldb stats %s' % self.irc.nick) self.assertNotError('channeldb stats %s' % self.irc.nick) self.assertNotError('channeldb stats %s' % self.irc.nick) - m1 = self.getMsg('channeldb stats %s' % self.irc.nick) + id = ircdb.users.getUserId(self.prefix) + u = ircdb.users.getUser(id) + u.addCapability(ircdb.makeChannelCapability(self.channel, 'op')) + ircdb.users.setUser(id, u) self.assertNotError('channeldb toggle selfstats off') + m1 = self.getMsg('channeldb stats %s' % self.irc.nick) m2 = self.getMsg('channeldb stats %s' % self.irc.nick) self.assertEqual(m1.args[1], m2.args[1])