From 660ba14e963e049e667d1ce40241f30bbcbd1ca1 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 24 Oct 2003 11:03:43 +0000 Subject: [PATCH] Fixed some failing test cases. --- plugins/MoobotFactoids.py | 2 +- test/test_MoobotFactoids.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/MoobotFactoids.py b/plugins/MoobotFactoids.py index 37d803c96..c19602f8b 100644 --- a/plugins/MoobotFactoids.py +++ b/plugins/MoobotFactoids.py @@ -256,7 +256,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp): return # Otherwise, cursor.execute("""INSERT INTO factoids VALUES - (%s, %s, %s, NULL, NULL, NULL, NULL, NULL, + (%s, %s, %s, NULL, NULL, NULL, NULL, NULL, NULL, %s, 0)""", key, id, int(time.time()), fact) self.db.commit() diff --git a/test/test_MoobotFactoids.py b/test/test_MoobotFactoids.py index 951f435ed..e8539a35d 100644 --- a/test/test_MoobotFactoids.py +++ b/test/test_MoobotFactoids.py @@ -91,7 +91,8 @@ if sqlite is not None: self.assertRegexp('factinfo moo', '^moo: Created by tester on' '.*?\. Last modified by tester on .*?\. ' 'Last requested by foo!bar@baz on .*?, ' - 'requested 2 times. Locked on .*\.$') + 'requested 2 times. ' + 'Locked by tester on .*\.$') self.assertNotError('unlock moo') self.assertRegexp('factinfo moo', '^moo: Created by tester on' '.*?\. Last modified by tester on .*?\. ' @@ -110,13 +111,13 @@ if sqlite is not None: self.assertNotError('moo is moo') self.assertNotError('lock moo') self.assertRegexp('factinfo moo', '^moo: Created by tester on' - '.*?\. Locked on .*?\.') + '.*?\. Locked by tester on .*?\.') # switch user self.prefix = 'moo!moo@moo' self.assertNotError('register nottester moo') self.assertError('unlock moo') self.assertRegexp('factinfo moo', '^moo: Created by tester on' - '.*?\. Locked on .*?\.') + '.*?\. Locked by tester on .*?\.') # switch back self.prefix = 'foo!bar@baz' self.assertNotError('identify tester moo') @@ -162,8 +163,7 @@ if sqlite is not None: def testListauth(self): self.assertNotError('moo is moo') - self.assertResponse('listauth tester', 'Author search for tester ' - '(1 found): \'moo\'') + self.assertRegexp('listauth tester', 'tester.*\(1 found\):.*moo') self.assertError('listauth moo') def testDelete(self):