Fixed some failing test cases.

This commit is contained in:
Jeremy Fincher 2003-10-24 11:03:43 +00:00
parent 44227181b7
commit 660ba14e96
2 changed files with 6 additions and 6 deletions

View File

@ -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()

View File

@ -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 <reply>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 <reply>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):